_Type.GetMethods _Type.GetMethods _Type.GetMethods _Type.GetMethods Method

定義

為 COM 物件提供與版本無關的 GetMethods 方法之存取權。Provides COM objects with version-independent access to the GetMethods method.

多載

GetMethods() GetMethods() GetMethods() GetMethods()

為 COM 物件提供與版本無關的 GetMethods() 方法之存取權。Provides COM objects with version-independent access to the GetMethods() method.

GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags)

為 COM 物件提供與版本無關的 GetMethods(BindingFlags) 方法之存取權。Provides COM objects with version-independent access to the GetMethods(BindingFlags) method.

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetMethods方法會取得目前的方法TypeThe Type.GetMethods method gets the methods of the current Type.

GetMethods() GetMethods() GetMethods() GetMethods()

為 COM 物件提供與版本無關的 GetMethods() 方法之存取權。Provides COM objects with version-independent access to the GetMethods() method.

public:
 cli::array <System::Reflection::MethodInfo ^> ^ GetMethods();
public System.Reflection.MethodInfo[] GetMethods ();
abstract member GetMethods : unit -> System.Reflection.MethodInfo[]
Public Function GetMethods () As MethodInfo()

傳回

MethodInfo 物件的陣列,代表為目前 Type 定義的所有公用方法。An array of MethodInfo objects representing all the public methods defined for the current Type.

-或--or- MethodInfo 類型的空陣列 (如果沒有為目前 Type 定義公用方法)。An empty array of type MethodInfo, if no public methods are defined for the current Type.

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetMethods方法會傳回在目前的所有公用方法TypeThe Type.GetMethods method returns all the public methods of the current Type.

GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags)

為 COM 物件提供與版本無關的 GetMethods(BindingFlags) 方法之存取權。Provides COM objects with version-independent access to the GetMethods(BindingFlags) method.

public:
 cli::array <System::Reflection::MethodInfo ^> ^ GetMethods(System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MethodInfo[] GetMethods (System.Reflection.BindingFlags bindingAttr);
abstract member GetMethods : System.Reflection.BindingFlags -> System.Reflection.MethodInfo[]
Public Function GetMethods (bindingAttr As BindingFlags) As MethodInfo()

參數

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

位元遮罩,由一或多個 BindingFlags 組成,而這些旗標會指定執行搜尋的方式。A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-或--or- 零,傳回 nullZero, to return null.

傳回

MethodInfo 物件的陣列,代表為目前 Type 定義之符合指定繫結條件約束的所有方法。An array of MethodInfo objects representing all methods defined for the current Type that match the specified binding constraints.

-或--or- 如果沒有任何方法定義給目前的 MethodInfo,或沒有已定義的方法符合繫結條件約束,則為 Type 類型的空陣列。An empty array of type MethodInfo, if no methods are defined for the current Type, or if none of the defined methods match the binding constraints.

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetMethods方法定義給目前的方法會搜尋Type,使用指定的繫結條件約束。The Type.GetMethods method searches for the methods defined for the current Type, using the specified binding constraints.

適用於