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

適用於

另請參閱