#define

  • Thread starter Thread starter A.M
  • Start date Start date
A

A.M

Hi,

We used to have preprocessors like #define and #ifdef in C++.
How can i have them in C# ?

Thanks,
Ali
 
Ali,

You can not. They are not supported in C#.

Hope this helps.
 
A.M said:
We used to have preprocessors like #define and #ifdef in C++.
How can i have them in C# ?

You can't, to quite the same extent. C# doesn't have macros, but it
does have conditional compilation. You can still do #define and #if,
but symbols are just "defined" or "undefined" - they don't have values.

See http://www.jaggersoft.com/csharp_standard/9.5.htm for more
information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top