How do you "#define" in C#?

  • Thread starter Thread starter James
  • Start date Start date
Hi James,

The #define statement in C# is only used for defining symbols that can be
tested for existence with the other preprocessor directives, #if and #elif.

That is to say, you cannot use #define in the same way as C++. In C#, it is
only used to define a symbol used in preprocessor conditionals.

Please see the following article for a (probably better) description of
#define, in C# (URL may wrap):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vclrfdefine.asp

-- Tom
 
Back
Top