Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

At first glance, it looks like what I used to do in C++.  But now I am wondering if that's what I actually need.

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?

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.