![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I need to detect at runtime if the application was started from VS 2005. Is it possible? Also, how can I know at runtime of app is built for Debug or Release? Thanks |
#3
| |||
| |||
|
|
You can tell Visual Studio to run your application with a special command line argument. Click Project -> Properties -> Debug and enter "/debug" as an argument. Use the following if-statement in your program to detect if it was started from Visual Studio: string[] args = Environment.GetCommandLineArgs(); // remove this line if your program is a console application if (args.Length > 0 && args[0] == "/debug") // started from VS else // not started from VS |
|
I'm sure there are more elegant solutions but this is one of the easiest. "bz" <bzam... (AT) gmail (DOT) com> schrieb im Newsbeitragnews:fc1d3b1e-85d0-4693-98f9-533e8a15051a (AT) e1g2000hsh (DOT) googlegroups.com... Hi, I need to detect at runtime if the application was started from VS 2005. Is it possible? Also, how can I know at runtime of app is built for Debug or Release? Thanks- Ascunde citatul - - Afișare text în citat - |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |