CSharp examples for System.Reflection:Assembly
Get Assembly Product
// The MIT License using System.Runtime.InteropServices; using System.Reflection; using System.Linq; using System;/*from w ww . jav a 2 s . c om*/ public class Main{ public static string GetAssemblyProduct(this Assembly assembly) { var query = from products in assembly.GetCustomAttributes<AssemblyProductAttribute>() select products; if(1 == query.Count()) { return query.First().Product; } return ""; } }