I use a web service in a C# project. I test the project both online and on localhost. I have code like:
//var proxy = new PanoNestWebsite.ScheduleImagePanonest.ScheduleImageProcessingClient();
//var s = new ScheduleImagePanonest.ScheduleImageProcessing();
var proxy = new ScheduleImageLocal.ScheduleImageProcessingClient();
var s = new ScheduleImageLocal.ScheduleImageProcessing();
For example, If I want to deploy it online I uncomment the first two lines, and comment the last two.
But I have much more changes to make, and I don't like commenting and uncommenting all lines. How can I use proprocessing directives to define a variable like: IsLocal and I just set it to true to include the local code, or to false to include the server code? How can I write something like this?