TypeBuilder.GetProperties(BindingFlags) 方法

定义

按照指定,返回此类型声明或继承的所有公共和非公共属性。

public:
 override cli::array <System::Reflection::PropertyInfo ^> ^ GetProperties(System::Reflection::BindingFlags bindingAttr);
public override System.Reflection.PropertyInfo[] GetProperties (System.Reflection.BindingFlags bindingAttr);
override this.GetProperties : System.Reflection.BindingFlags -> System.Reflection.PropertyInfo[]
Public Overrides Function GetProperties (bindingAttr As BindingFlags) As PropertyInfo()

参数

bindingAttr
BindingFlags

此调用属性。 这必须是来自 BindingFlags 的位标志:InvokeMethodNonPublic 等等。

返回

如果使用 nonPublic,则返回 PropertyInfo 对象的数组,表示在此类型上定义的公共和非公共属性;否则,仅返回公共属性。

例外

不会为不完整类型实现此方法。

注解

使用 Type.GetTypeAssembly.GetType 检索类型,并在检索的类型上使用反射。

适用于