RuntimeReflectionExtensions.GetMethodInfo(Delegate) 方法

定义

获取指示指定委托表示的方法的对象。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

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

返回

表示该方法的对象。An object that represents the method.

异常

delnulldel is null.

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

适用于

另请参阅