public static void Example_ShowAttribute() { ReportingPlugin rp = new ReportingPlugin(); Type t = rp.GetType(); var attrs = t.GetCustomAttributes(false); foreach (var attr in attrs) { Console.WriteLine("Name:{0}", ((PluginInformationAttribute)attr).Name); Console.WriteLine("Auther:{0}", ((PluginInformationAttribute)attr).Auther); Console.WriteLine("Description:{0}", ((PluginInformationAttribute)attr).Description); } }
static void Main(string[] args) { //Compiler_Handled.Example_CallerInfo(); ReportingPlugin.Example_ShowAttribute(); Console.ReadLine(); }