"Andrew Falanga" <af******@gmail.comwrote in message
news:27**********************************@j22g2000 hsf.googlegroups.com...
Hi,
How do I get the application name during run time. In C or C++ I use
argv[0], but in C# args[0] contains the first argument to the program
not the program name. So, what is the magic to getting this?
There may be an easier way, but this works:
String thismodulefilenamestr =
System.IO.Path.GetFileName(System.Diagnostics.Proc ess.GetCurrentProcess().MainModule.FileName);
Mark
--
Mark Salsbery
Microsoft MVP - Visual C++
>
Thanks,
Andy