Re: Detect if app was started from VS
- From: bz <bzamfir@xxxxxxxxx>
- Date: Sun, 18 Nov 2007 04:05:57 -0800 (PST)
On 18 Noi, 10:35, "Christoph Hausner" <christoph_haus...@xxxxxxxxxx>
wrote:
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
Thank you
I'm sure there are more elegant solutions but this is one of the easiest.
"bz" <bzam...@xxxxxxxxx> schrieb im Newsbeitragnews:fc1d3b1e-85d0-4693-98f9-533e8a15051a@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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 -
.
- References:
- Detect if app was started from VS
- From: bz
- Re: Detect if app was started from VS
- From: Christoph Hausner
- Detect if app was started from VS
- Prev by Date: Re: Detect if app was started from VS
- Next by Date: Detect if an event has event handler
- Previous by thread: Re: Detect if app was started from VS
- Next by thread: Project with dataset, datatable, and datarow.
- Index(es):
Relevant Pages
|
|