RuntimeReflectionExtensions.GetMethodInfo(Delegate) RuntimeReflectionExtensions.GetMethodInfo(Delegate) RuntimeReflectionExtensions.GetMethodInfo(Delegate) RuntimeReflectionExtensions.GetMethodInfo(Delegate) Method

定义

获取一个对象,表示指定的委托所表示的方法。Gets an object that represents the method represented by the specified delegate.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Reflection::MethodInfo ^ GetMethodInfo(Delegate ^ del);
public static System.Reflection.MethodInfo GetMethodInfo (this Delegate del);
static member GetMethodInfo : Delegate -> System.Reflection.MethodInfo
<Extension()>
Public Function GetMethodInfo (del As Delegate) As MethodInfo

参数

del
Delegate Delegate Delegate Delegate

要检查的委托。The delegate to examine.

返回

一个对象,表示的方法。An object that represents the method.

异常

调用方不能访问由委托表示的方法(例如,在方法为私有方法的情况下)。The caller does not have access to the method represented by the delegate (for example, if the method is private).

适用于

另请参阅