"Don" <un*****@oblivion.com> schrieb:
Is there any way to check, in code, whether that code is being executed
because of a compile as opposed to being executed because someone is just
running the program?
Code won't run when it's compiled. What you can do is distinguish between a
release and debug version, and you can check if a debugger is attached:
\\\
#If DEBUG Then
Console.WriteLine("Debug mode.")
#Else
Console.WriteLine("Release mode.")
#End If
///
Make sure that the option "Configuration settings" -> "Build" "Define DEBUG
constant" in the project properties is checked.
- and/or -
'System.Diagnostics.Debugger.IsAttached'
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>