TypeBuilder.GetProperties(BindingFlags) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
按指定返回此类型声明或继承的所有公共和非公共属性。
public:
override cli::array <System::Reflection::PropertyInfo ^> ^ GetProperties(System::Reflection::BindingFlags bindingAttr);
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)]
public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr);
public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr);
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)>]
override this.GetProperties : System.Reflection.BindingFlags -> System.Reflection.PropertyInfo[]
override this.GetProperties : System.Reflection.BindingFlags -> System.Reflection.PropertyInfo[]
Public Overrides Function GetProperties (bindingAttr As BindingFlags) As PropertyInfo()
参数
- bindingAttr
- BindingFlags
此调用属性。 这必须是 :BindingFlagsInvokeMethod、NonPublic等等的位标志。
返回
返回表示在此类型PropertyInfo上定义的公共和非公共属性的对象数组nonPublic;否则,只返回公共属性。
- 属性
例外
此方法未针对不完整的类型实现。
注解
使用 Type.GetType 或使用 Assembly.GetType 所检索类型的反射来检索类型。