General information
Category:
Coding, syntax and commands
>Hi All,
>
>I have a process in my application that I have moved out to a seperate dll. Some of the methods are operating on a directory under the using application directory. Is there a way for me to obtain the directory either where the dll exists or the directory of the application using the dll?
>
>I could pass it in from the application, but it seems like a detail the application shouldn't have to worry about.
Hi,
I *think* that calling System.Reflection.Assembly.GetExecutingAssembly().Location from within the DLL will give the location of the DLL.
AppDomain.CurrentDomain.BaseDirectory should give the location of the main EXE....
HTH,
Viv
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only