Bewerken

Delen via


EventInfo.GetOtherMethods Method

Definition

Returns the methods that were associated with an event in MSIL using the .other directive.

Overloads

GetOtherMethods()

Returns the public methods that have been associated with an event in metadata using the .other directive.

GetOtherMethods(Boolean)

Returns the methods that have been associated with the event in metadata using the .other directive, specifying whether to include non-public methods.

GetOtherMethods()

Source:
EventInfo.cs
Source:
EventInfo.cs
Source:
EventInfo.cs

Returns the public methods that have been associated with an event in metadata using the .other directive.

public:
 cli::array <System::Reflection::MethodInfo ^> ^ GetOtherMethods();
public System.Reflection.MethodInfo[] GetOtherMethods ();
member this.GetOtherMethods : unit -> System.Reflection.MethodInfo[]
Public Function GetOtherMethods () As MethodInfo()

Returns

An array representing the public methods that have been associated with the event in metadata by using the .other directive. If there are no such public methods, an empty array is returned.

Remarks

The metadata for an event can associate four kinds of methods with the event:

  • The .addon directive specifies the method used to add event handlers. Use the GetAddMethod method to retrieve an EventInfo for that method.

  • The .removeon directive specifies the method used to detach event handlers. Use the GetRemoveMethod method to retrieve an EventInfo for that method.

  • The .fire directive specifies the method used to raise the event. Use the GetRaiseMethod method to retrieve an EventInfo for that method.

  • The .other directive specifies any other methods associated with the event. Use the GetOtherMethods method to retrieve an array of EventInfo objects for those methods.

The methods associated with an event using the .other directive have no special significance to the runtime. The C# and Visual Basic compilers do not use the .other directive.

Applies to

GetOtherMethods(Boolean)

Source:
EventInfo.cs
Source:
EventInfo.cs
Source:
EventInfo.cs

Returns the methods that have been associated with the event in metadata using the .other directive, specifying whether to include non-public methods.

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()

Parameters

nonPublic
Boolean

true to include non-public methods; otherwise, false.

Returns

An array representing methods that have been associated with an event in metadata by using the .other directive. If there are no methods matching the specification, an empty array is returned.

Exceptions

This method is not implemented.

Remarks

The metadata for an event can associate four kinds of methods with the event:

  • The .addon directive specifies the method used to add event handlers. Use the GetAddMethod method to retrieve an EventInfo for that method.

  • The .removeon directive specifies the method used to detach event handlers. Use the GetRemoveMethod method to retrieve an EventInfo for this method.

  • The .fire directive specifies the method used to raise the event. Use the GetRaiseMethod method to retrieve an EventInfo for this method.

  • The .other directive specifies any other methods associated with the event. Use the GetOtherMethods method to retrieve an array of EventInfo objects for those methods.

The methods associated with an event using the .other directive have no special significance to the runtime. The C# and Visual Basic compilers do not use the .other directive.

Applies to