Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the methods that were associated with an event in MSIL using the .other
directive.
GetOtherMethods() |
Returns the public methods that have been associated with an event in metadata using the |
GetOtherMethods(Boolean) |
Returns the methods that have been associated with the event in metadata using the |
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()
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.
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.
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
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()
true
to include non-public methods; otherwise, false
.
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.
This method is not implemented.
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.
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in