CSharp examples for System.Reflection:Assembly
Get Assembly Trademark
// The MIT License using System.Runtime.InteropServices; using System.Reflection; using System.Linq; using System;//from ww w . j a v a2 s . co m public class Main{ public static string GetAssemblyTrademark(this Assembly assembly) { var query = from trademarks in assembly.GetCustomAttributes<AssemblyTrademarkAttribute>() select trademarks; if(1 == query.Count()) { return query.First().Trademark; } return ""; } }