In order to get the path of the current executing assembly in C#:
// Get the current running assembly code
System.Reflection.Assembly myAssembly = System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.FullyQualifiedName;
//Now we can get the path where the current code is running
String myPath = System.IO.Path.GetDirectoryName(myAssembly);
No comments:
Post a Comment