_Type.GetProperties 方法

定义

为 COM 对象提供对 GetProperties 方法的与版本无关的访问。

重载

GetProperties()

为 COM 对象提供对 GetProperties() 方法的与版本无关的访问。

GetProperties(BindingFlags)

为 COM 对象提供对 GetProperties(BindingFlags) 方法的与版本无关的访问。

注解

此方法用于从非托管代码访问托管类,不应从托管代码调用。

方法 Type.GetProperties 获取当前 Type的属性。

GetProperties()

为 COM 对象提供对 GetProperties() 方法的与版本无关的访问。

public:
 cli::array <System::Reflection::PropertyInfo ^> ^ GetProperties();
public System.Reflection.PropertyInfo[] GetProperties ();
abstract member GetProperties : unit -> System.Reflection.PropertyInfo[]
Public Function GetProperties () As PropertyInfo()

返回

表示当前 PropertyInfo 的所有公共属性的 Type 对象数组。

- 或 -

如果当前 PropertyInfo 没有公共属性,则为 Type 类型的空数组。

注解

此方法用于从非托管代码访问托管类,不应从托管代码调用。

方法 Type.GetProperties 返回当前 Type的所有公共属性。

适用于

GetProperties(BindingFlags)

为 COM 对象提供对 GetProperties(BindingFlags) 方法的与版本无关的访问。

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

参数

bindingAttr
BindingFlags

一个位屏蔽,由一个或多个指定搜索执行方式的 BindingFlags 组成。

- 或 -

零,以返回 null

返回

表示当前 PropertyInfo 的匹配指定绑定约束的所有属性的 Type 对象数组。

- 或 -

如果当前 PropertyInfo 没有属性,或者如果没有一个属性匹配绑定约束,则为 Type 类型的空数组。

注解

此方法用于从非托管代码访问托管类,不应从托管代码调用。

方法 Type.GetProperties 使用指定的绑定约束搜索当前 Type的属性。

适用于