CSharp examples for System.Reflection:Assembly
Is Assembly COM Visible
// The MIT License using System.Runtime.InteropServices; using System.Reflection; using System.Linq; using System;/*from w w w. jav a 2 s . com*/ public class Main{ public static bool IsAssemblyCOMVisible(this Assembly assembly) { var query = from visibles in assembly.GetCustomAttributes<ComVisibleAttribute>() select visibles; if(1 == query.Count()) { return query.First().Value; } return false; } }