"Bob" <bd*****@sgiims .comschrieb:
If I'm running the executable, I need to do something, but if I am running
the program fom within Visual studio I need to use another bit of code.
Maybe the following solutions fit your requirements:
\\\
#If DEBUG Then
Console.WriteLi ne("Debug mode.")
#Else
Console.WriteLi ne("Release mode.")
#End If
///
Make sure that the option "Configurat ion settings" -"Build" "Define DEBUG
constant" in the project properties is checked.
- and/or -
You can check if a debugger is attached:
'System.Diagnos tics.Debugger.I sAttached'.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>