_PropertyInfo.GetGetMethod 方法
定义
为 COM 对象提供对 GetGetMethod 方法的与版本无关的访问。Provides COM objects with version-independent access to the GetGetMethod methods.
重载
| GetGetMethod() |
为 COM 对象提供对 GetGetMethod() 方法的与版本无关的访问。Provides COM objects with version-independent access to the GetGetMethod() method. |
| GetGetMethod(Boolean) |
为 COM 对象提供对 GetGetMethod(Boolean) 方法的与版本无关的访问。Provides COM objects with version-independent access to the GetGetMethod(Boolean) method. |
注解
此方法用于从非托管代码访问托管类,不应从托管代码调用。This method is for access to managed classes from unmanaged code and should not be called from managed code.
GetGetMethod方法返回一个对象,该 MethodInfo 对象表示 get 此属性的访问器。The GetGetMethod methods return a MethodInfo object representing the get accessor for this property.
GetGetMethod()
为 COM 对象提供对 GetGetMethod() 方法的与版本无关的访问。Provides COM objects with version-independent access to the GetGetMethod() method.
public:
System::Reflection::MethodInfo ^ GetGetMethod();
public System.Reflection.MethodInfo GetGetMethod ();
abstract member GetGetMethod : unit -> System.Reflection.MethodInfo
Public Function GetGetMethod () As MethodInfo
返回
MethodInfo 对象,表示此属性的公共 get 访问器;如果 null 访问器是非公共的或不存在,则为 get。A MethodInfo object representing the public get accessor for this property, or null if the get accessor is non-public or does not exist.
注解
此方法用于从非托管代码访问托管类,不应从托管代码调用。This method is for access to managed classes from unmanaged code and should not be called from managed code.
GetGetMethod方法返回 get 此属性的公共访问器。The GetGetMethod method returns the public get accessor for this property.
适用于
GetGetMethod(Boolean)
为 COM 对象提供对 GetGetMethod(Boolean) 方法的与版本无关的访问。Provides COM objects with version-independent access to the GetGetMethod(Boolean) method.
public:
System::Reflection::MethodInfo ^ GetGetMethod(bool nonPublic);
public System.Reflection.MethodInfo GetGetMethod (bool nonPublic);
abstract member GetGetMethod : bool -> System.Reflection.MethodInfo
Public Function GetGetMethod (nonPublic As Boolean) As MethodInfo
参数
- nonPublic
- Boolean
true 表示返回非公共的 get 访问器;否则,为 false。true to return a non-public get accessor; otherwise, false.
返回
如果 nonPublic 参数为 true,则返回表示此属性的 get 访问器的 MethodInfo 对象。A MethodInfo object representing the get accessor for this property, if the nonPublic parameter is true. 如果 nonPublic 为 false 且 get 访问器是非公共的,或者 nonPublic 为 true 但是不存在 get 访问器,则返回 null。Or null if nonPublic is false and the get accessor is non-public, or if nonPublic is true but no get accessors exist.
注解
此方法用于从非托管代码访问托管类,不应从托管代码调用。This method is for access to managed classes from unmanaged code and should not be called from managed code.
GetGetMethod方法返回此属性的公共或非公共 get 访问器。The GetGetMethod method returns the public or non-public get accessor for this property.