CSharp examples for System.Reflection:Assembly
Get Assembly Location
using System.Reflection; using System.Linq; using System.Collections.Generic; using System;//from w w w . j av a2s . co m public class Main{ public static string GetAssemblyLocation(this Type type) { var asm = type.GetTypeInfo().Assembly; var locationProperty = asm.GetType().GetRuntimeProperties().Single(p => p.Name == "Location"); return (string)locationProperty.GetValue(asm); } }