TypeInfo.GetDeclaredMethods(String) 方法

定義

傳回集合,其中包含所有在目前類型宣告之所有公用方法中符合指定名稱者。Returns a collection that contains all public methods declared on the current type that match the specified name.

public:
 virtual System::Collections::Generic::IEnumerable<System::Reflection::MethodInfo ^> ^ GetDeclaredMethods(System::String ^ name);
public virtual System.Collections.Generic.IEnumerable<System.Reflection.MethodInfo> GetDeclaredMethods (string name);
abstract member GetDeclaredMethods : string -> seq<System.Reflection.MethodInfo>
override this.GetDeclaredMethods : string -> seq<System.Reflection.MethodInfo>
Public Iterator Overridable Function GetDeclaredMethods (name As String) As IEnumerable(Of MethodInfo)

參數

name
String

要尋找的方法名稱。The method name to search for.

傳回

包含符合 name 之方法的集合。A collection that contains methods that match name.

例外狀況

namenullname is null.

適用於