get assembly location
Published: 30. November 2011 | Updated: 30. November 2011License: Microsoft Public License (MS-PL)
Categories: Framework » Reflection
Tags: C# File System Reflection
Snippet example shows how to get assembly (dll) location path
Import namespaces
using System.Diagnostics; using System.Reflection;
Code
Assembly assembly = Assembly.GetAssembly(typeof(Process)); string location = assembly.Location; Console.WriteLine(location);Console Output:
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
| Send us feedback about this snippet » |





