IReflect.GetMethods(BindingFlags) IReflect.GetMethods(BindingFlags) IReflect.GetMethods(BindingFlags) IReflect.GetMethods(BindingFlags) Method

定义

检索与所有公共方法或当前类的所有方法相关的 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 BindingFlags BindingFlags 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.

适用于

另请参阅