IReflect.GetMethods(BindingFlags) 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检索与所有公共方法或当前类的所有方法相关的 MethodInfo 对象的数组。
public:
cli::array <System::Reflection::MethodInfo ^> ^ GetMethods(System::Reflection::BindingFlags bindingAttr);
C#
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
用于控制搜索的绑定属性。
MethodInfo 对象的数组,包含为此反射对象定义的符合 bindingAttr
中指定的搜索约束的所有方法。
仅当返回公共方法时,才会指示 的非公共属性 bindingAttr
。
产品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |