executable path...

  • Thread starter Thread starter David
  • Start date Start date
D

David

hello...
i've another question! ;)
how can i know from user control i writen, in wich directory user program,
wich uses my control, sits..?

thnx...
 
David,

You will want to get the entry point for this. Basically, call the
static GetEntryAssembly method on the Assembly class, and on the returned
Assembly instance, use the CodeBase property (or the Location property,
depending on your needs).

Hope this helps.
 
tried this:
this.Path = System.Reflection.Assembly.GetEntryAssembly().CodeBase;

where "Path" is a string variable...but it returns this error:

"object reference not set to an instance of object"... ???

GetEntryAssembly() returns null value
 
Back
Top