CSharp examples for System.Reflection:Assembly
Get Directory Path
using System.Reflection; using System.IO;/*from w w w . j a v a2 s. c o m*/ using System; public class Main{ internal static string GetDirectoryPath(this Assembly assembly) { var codeBase = assembly.CodeBase; var uri = new UriBuilder(codeBase); var path = Uri.UnescapeDataString(uri.Path); return Path.GetDirectoryName(path); } }