_PropertyInfo.GetAccessors 方法

定义

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

重载

GetAccessors()

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

GetAccessors(Boolean)

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

注解

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

方法GetAccessors返回此属性上的 和 set 访问器数组get

GetAccessors()

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

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

返回

如果找到访问器,则返回一个 MethodInfo 对象的数组,这些对象反射了由当前实例反射的属性的公共 getset 以及其他访问器;如果没有找到访问器,则返回包含零 (0) 个元素的数组。

注解

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

方法 GetAccessors 返回一个数组,其元素反映当前实例反射的属性的公共 getset和其他访问器。

适用于

GetAccessors(Boolean)

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

public:
 cli::array <System::Reflection::MethodInfo ^> ^ GetAccessors(bool nonPublic);
public System.Reflection.MethodInfo[] GetAccessors (bool nonPublic);
abstract member GetAccessors : bool -> System.Reflection.MethodInfo[]
Public Function GetAccessors (nonPublic As Boolean) As MethodInfo()

参数

nonPublic
Boolean

true 表示在返回的 MethodInfo 数组中包含非公共方法;否则,为 false

返回

一个 MethodInfo 对象的数组,其元素反射了由当前实例反射的属性的 getset 及其他访问器。 如果 nonPublic 参数为 true,则此数组包含公共及非公共 getset 及其他访问器。 如果 nonPublicfalse,则此数组仅包含公共 getset 及其他访问器。 如果没有找到具有指定可见性的访问器,则此方法将返回包含零 (0) 个元素的数组。

注解

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

方法 GetAccessors 返回一个数组,该数组的元素反映当前实例反射的属性的公共和非公共 getset、 和其他访问器(如果指定)。

适用于