curiouswebster
asked on
Need to use a compiler directive in C#
Hi,
Back in my C++ days I could include or exclude lines of code depending on the program I wanted to build. I simply coded aditional variable thet I either commented out or utilized.
Can I do this in C#??
I use Visual Studio 2006 Version 8.0.
Please tell me if it's possible and how to implement it.
Thanks,
newbieweb
Back in my C++ days I could include or exclude lines of code depending on the program I wanted to build. I simply coded aditional variable thet I either commented out or utilized.
Can I do this in C#??
I use Visual Studio 2006 Version 8.0.
Please tell me if it's possible and how to implement it.
Thanks,
newbieweb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Definitely. I'd go for this approach. Just set a flag to use some functionality or not. Should be easy, definitely easier than recompiling and deploying.
ASKER
I have a workiong program into which I integrated a web service. But I am trying to run myprogram and a few other computers to process a large amount of data tonight. But the web serice is not configured fro the extra machines and the guy who knows how to configure it won't be here until Monday.
I'd rather use a switch that I can load from a database to turn the web service functionality on or off.
I imagine I should not have any problem with this approach. Do you?