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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top