TypeBuilder.GetProperties(BindingFlags) TypeBuilder.GetProperties(BindingFlags) TypeBuilder.GetProperties(BindingFlags) TypeBuilder.GetProperties(BindingFlags) Method

定义

按照指定,返回此类型声明或继承的所有公共和非公共属性。Returns all the public and non-public properties declared or inherited by this type, as specified.

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 BindingFlags BindingFlags

此调用属性。This invocation attribute. 这必须是来自 BindingFlags 的位标志:InvokeMethodNonPublic 等等。This must be a bit flag from BindingFlags : InvokeMethod, NonPublic, and so on.

返回

如果使用 nonPublic,则返回 PropertyInfo 对象的数组,表示在此类型上定义的公共和非公共属性;否则,仅返回公共属性。Returns an array of PropertyInfo objects representing the public and non-public properties defined on this type if nonPublic is used; otherwise, only the public properties are returned.

异常

不会为不完整类型实现此方法。This method is not implemented for incomplete types.

注解

使用Type.GetTypeAssembly.GetType检索类型,并对检索到的类型使用反射。Retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.

适用于