I am writing a web services project in C#/.NET 3.5 / VS 2008.
I declare several constants such as:
private const string var1 = "hello";
I'd like to change the value of this string when testing, so I put a #TEST directive on top of my .cs file.
But I cannot do:
if (#TEST)
{private const string var1 = "hello test";}
else
{private const string var1 = "hello";}
in the variable declaration. It will not compile.
I do not want to change the value in various functions because there are too many functions using the value.
Any suggestions?
...
Go to the complete details ...