A
Aryeh Katz
How can I determine the full name of a c# executable, like the c
GetModuleFileName?
Thanks.
Aryeh
GetModuleFileName?
Thanks.
Aryeh
Thanks, this is exactly what I need.Nicholas said:Aryeh,
On the Assembly class, there is a Location property you can use to get
the location of the assembly. Now, to get the assembly to get the property
of, you can use the static GetExecutingAssembly, which will give you the
assembly of the code that called it, or you can use the static
GetEntryAssembly method, which will return the assembly that is the entry
point. For most applications, this assembly is the executable which was
launched.
I guess what you're saying makes sense.Nicholas said:Aryeh,
I don't think that GetModuleFileName will give you the results that you
want. That is for DLLs that are native code, not necessarily managed code.