EventInfo.GetOtherMethods 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回使用 .other 指示詞與 MSIL 中的事件產生關聯的方法。
多載
| GetOtherMethods() |
傳回使用 |
| GetOtherMethods(Boolean) |
傳回使用 |
GetOtherMethods()
- 來源:
- EventInfo.cs
- 來源:
- EventInfo.cs
- 來源:
- 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)
- 來源:
- EventInfo.cs
- 來源:
- EventInfo.cs
- 來源:
- 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 指示詞。