IReflect.GetMethods(BindingFlags) 方法

定義

使用所有公用方法或所有目前類別的方法,擷取 MethodInfo 物件陣列。Retrieves an array of MethodInfo objects with all public methods or all methods of the current class.

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

繫結屬性,用來控制搜尋。The binding attributes used to control the search.

傳回

MethodInfo 物件陣列,包含為符合 bindingAttr 中所指定搜尋條件約束的這個反映物件定義的所有方法。An array of MethodInfo objects containing all the methods defined for this reflection object that meet the search constraints specified in bindingAttr.

備註

只有在傳回公用方法時bindingAttr , 才會指出的非公用屬性。The non-public attribute of bindingAttr is indicated only if public methods are returned.

適用於

另請參閱