Keywords: C#, Assembly Path
The following function can adapt in Exe and Dll project.
private String GetAssemblyPath()
{
String fileName = null;
Type type = this.GetType();
fileName = type.Module.FullyQualifiedName;
return Path.GetDirectoryName(fileName);
}
No comments:
Post a Comment