CSharp examples for System.Reflection:Assembly
Get Assembly Configuration
// The MIT License using System.Runtime.InteropServices; using System.Reflection; using System.Linq; using System;//from w ww . j a va 2 s . com public class Main{ public static string GetAssemblyConfiguration(this Assembly assembly) { var query = from configurations in assembly.GetCustomAttributes<AssemblyConfigurationAttribute>() select configurations; if(1 == query.Count()) { return query.First().Configuration; } return ""; } }