EventInfo access modifiers

I am stuck now at method to retrieve access modifiers of EventInfo object (reflected event field in C# .NET).

By access modifiers I mean: public/private/protected/internal and static, readonly etc.


In theory (at the IL level) there are basically three members making up the event:

  • add
  • remove
  • raise
  • You can access each of those via a separate EventInfo property ( AddMethod , RemoveMethod , RaiseMethod ) and check the access modifier for each of them. For events declared in C#, I'd expect no raise method, and the add/remove methods to have the same accessibility.

    链接地址: http://www.djcxy.com/p/21086.html

    上一篇: 在C#中从引用的DLL执行程序集名称

    下一篇: EventInfo访问修饰符