EventInfo.GetOtherMethods 方法    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回在 MSIL 中使用 .other 指令与事件相关联的方法。
重载
| GetOtherMethods() | 返回在元数据中使用  | 
| GetOtherMethods(Boolean) | 返回在元数据中使用  | 
GetOtherMethods()
- Source:
- EventInfo.cs
- Source:
- EventInfo.cs
- Source:
- EventInfo.cs
返回在元数据中使用 .other 指令与事件相关联的公共方法。
public:
 cli::array <System::Reflection::MethodInfo ^> ^ GetOtherMethods();public System.Reflection.MethodInfo[] GetOtherMethods ();member this.GetOtherMethods : unit -> System.Reflection.MethodInfo[]Public Function GetOtherMethods () As MethodInfo()返回
一个数组,表示在元数据中通过使用 .other 指令与事件相关联的公共方法。 如果没有此类公共方法,则返回空数组。
注解
事件的元数据可以将四种类型的方法与事件相关联:
- 指令 - .addon指定用于添加事件处理程序的方法。 GetAddMethod使用 方法检索EventInfo该方法的 。
- 指令 - .removeon指定用于分离事件处理程序的方法。 GetRemoveMethod使用 方法检索EventInfo该方法的 。
- 指令 - .fire指定用于引发事件的方法。 GetRaiseMethod使用 方法检索EventInfo该方法的 。
- 指令 - .other指定与事件关联的任何其他方法。 GetOtherMethods使用 方法检索这些方法的 EventInfo 对象的数组。
使用 .other 指令与事件关联的方法对运行时没有特殊意义。 C# 和 Visual Basic 编译器不使用 .other 指令。
适用于
GetOtherMethods(Boolean)
- Source:
- EventInfo.cs
- Source:
- EventInfo.cs
- Source:
- EventInfo.cs
返回在元数据中使用 .other 指令与事件相关联的方法,指定是否包括非公共方法。
public:
 virtual cli::array <System::Reflection::MethodInfo ^> ^ GetOtherMethods(bool nonPublic);public virtual System.Reflection.MethodInfo[] GetOtherMethods (bool nonPublic);abstract member GetOtherMethods : bool -> System.Reflection.MethodInfo[]
override this.GetOtherMethods : bool -> System.Reflection.MethodInfo[]Public Overridable Function GetOtherMethods (nonPublic As Boolean) As MethodInfo()参数
- nonPublic
- Boolean
如果包括非公共方法,则为 true;否则为 false。
返回
一个数组,表示在元数据中通过使用 .other 指令与事件相关联的方法。 如果没有与该规范匹配的方法,则返回空数组。
例外
未实现此方法。
注解
事件的元数据可以将四种类型的方法与事件相关联:
- 指令 - .addon指定用于添加事件处理程序的方法。 GetAddMethod使用 方法检索EventInfo该方法的 。
- 指令 - .removeon指定用于分离事件处理程序的方法。 GetRemoveMethod使用 方法检索EventInfo此方法的 。
- 指令 - .fire指定用于引发事件的方法。 GetRaiseMethod使用 方法检索EventInfo此方法的 。
- 指令 - .other指定与事件关联的任何其他方法。 GetOtherMethods使用 方法检索这些方法的 EventInfo 对象的数组。
使用 .other 指令与事件关联的方法对运行时没有特殊意义。 C# 和 Visual Basic 编译器不使用 .other 指令。