Skip to content

Instantly share code, notes, and snippets.

@gscattolin
Created September 10, 2013 18:21
Show Gist options
  • Select an option

  • Save gscattolin/6513422 to your computer and use it in GitHub Desktop.

Select an option

Save gscattolin/6513422 to your computer and use it in GitHub Desktop.
Get Assembly path
/// <summary>
/// Returns the path (with ending backslash) of current executing assembly
/// </summary>
/// <returns>Path of executing assembly</returns>
public static string AssemblyPath () {
return Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) +
Path.DirectorySeparatorChar;
}
/// <summary>
/// Returns the full name including path, file name and extension of current executing assembly
/// </summary>
/// <returns>Full name of current executing assembly</returns>
public static string AssemblyFullName () {
return Assembly.GetExecutingAssembly ().Location;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment