
Doing a #ifdef in Visual Basic???
Quote:
> Hence I've got two different builds configurations, well,
> four if you count debug & release versions, i.e.
> Developer_Debug
> Developer_Release
> Client_Debug
> Client_Release
According to the VB.NET docs regarding #If Then #Else (which you've probably
read now :-) ) you can use the Config compiler constant, but unless there's a
better constant expression than
#If Config > "Developer" Then ' matches both Developer configurations.
using an IsDeveloper constant is probably preferable.
Of course you could define
#Const IsDeveloper = (Config > "Developer")
to make further tests readable.
BTW The (1.1) docs state "Regardless of the outcome of any evaluation, all
expressions are evaluated using Option Compare Text. " but I've seen the
opposite to be true. That is "A" < "AB" < "Ab" < "a" < "ab".
For command line SDK users:
I found this NT (2000) command line successfully defines a string constant:
vbc -d:"ConstValue=\"SomeString\"" condcomp.vb
Also, Debug is not automatically defined by using the -debug+ command line
argument; -d:debug=-1 or the more readable -d:debug=True is required.
Regards,
Mark Hurd, B.Sc.(Ma.) (Hons.)