473,395 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Self Generated Warnings?

Is it possible in someway to write code,
that will flag up a warning at compile time as a kind of reminder?

I was thinking something along the lines of
Compiler.Warnings.Add("This Method is Incomplete");

Or alternatively in VS 2005?

Cheers
Chris

Jun 21 '07 #1
2 1140
theinvisibleGhost wrote:
Is it possible in someway to write code,
that will flag up a warning at compile time as a kind of reminder?

I was thinking something along the lines of
Compiler.Warnings.Add("This Method is Incomplete");

Or alternatively in VS 2005?
Use the #warning directive. Ex:

#warning This Method is Incomplete

See http://msdn2.microsoft.com/en-us/lib...x3(vs.80).aspx
--
Tom Porterfield
Jun 21 '07 #2
Thanks Tom :-)

On 21 Jun, 14:10, Tom Porterfield <tppor...@mvps.orgwrote:
theinvisibleGhostwrote:
Is it possible in someway to write code,
that will flag up a warning at compile time as a kind of reminder?
I was thinking something along the lines of
Compiler.Warnings.Add("This Method is Incomplete");
Or alternatively in VS 2005?

Use the #warning directive. Ex:

#warning This Method is Incomplete

Seehttp://msdn2.microsoft.com/en-us/library/963th5x3(vs.80).aspx
--
Tom Porterfield

Jun 21 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Olaf Meding | last post by:
What does the below PyChecker warning mean? More importantly, is there a way to suppress it? PyChecker warning: ..\src\phaseid\integration.py:21: self is argument in staticmethod My best...
8
by: Moah, full time turnip. | last post by:
Hi, I'm currently using Borland C++ Builder on an application using the STL, and it generates warnings I don't know how to handle: " Unit1.cpp(585): W8091 Argument template, _InputIter sent...
5
by: Igor Solodovnikov | last post by:
Hi. I am trying to automatically backup transaction log when error 9002 happened. So i have created appropriate job and alert to catch this error. I have two instances of sql server under Windows...
18
by: Ralf W. Grosse-Kunstleve | last post by:
My initial proposal (http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html) didn't exactly get a warm welcome... And Now for Something Completely Different: class autoinit(object):...
0
by: Steve Barker | last post by:
Hi guys! In Visual Studio .NET, I like to enable auto-generation of XML documentation on the project properties screen, by adding an XML file name under "Configuration Properties" --> "Build"...
2
by: dbuchanan | last post by:
I built a simple Data Access Layer with the Visual Studio 2005 DataSet Designer using the wizard. All who I have talked to who use it, articles I haver read by those who use it speak very highly...
0
by: jacquesvdz | last post by:
Hi guys/girls I already post this in javascript forum, but nobody could help me.C# guys are always sharp and fast, so I am trying ny Luck:-) I wonder who can help me: I know sort of how...
3
by: Rolf Welskes | last post by:
Hello, this is a hint only. If you make a custom control for example witch generates code <div......</div> and I put such a control in a page then in html-view of the aspx-file I could...
0
by: =?Utf-8?B?Tmljaw==?= | last post by:
Hi, I have a problem with the expiring self signed certificate on our server. Warning Event IDs 12017 and 12018 occuring every few minutes in the Application Event viewer. I have run the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.