Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement