EventInfo.GetOtherMethods Method

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

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

public MethodInfo[] GetOtherMethods()

Return Value

Type: System.Reflection.MethodInfo[]
An array of EventInfo objects 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.

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.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft