e.g. if i have 20 dll files and my application name is MyGreatApplication
then how to get the name "MyGreatApplication" at runtime?
thx in adv.
c
Have a look at the Application.ProductName attribute. Something like this:
/* ******************************* */
static void Main()
{
string appName = Application.ProductName;
Application.Run(new MyFirstForm());
}
/* ******************************* */
regards
roy fine
"Chang" <pohi...@hotmail.com> wrote in message
news:OFcV%23a5vE...@TK2MSFTNGP09.phx.gbl...
Assembly main = Assembly.GetEntryAssembly();
if ( main != null ) { return main.EntryPoint.ReflectedType; }
That'll give you the type hosting the entry point and should be very stable.
Unless you often
change class names.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
"Roy Fine" <rlf...@twt.obfuscate.net> wrote in message
news:uwvxKi5v...@TK2MSFTNGP09.phx.gbl...