Monday, January 14, 2008

How to get Assembly Path


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: