_PropertyInfo.GetGetMethod 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為 COM 物件提供與版本無關的 GetGetMethod 方法之存取權。
多載
| GetGetMethod() |
為 COM 物件提供與版本無關的 GetGetMethod() 方法之存取權。 |
| GetGetMethod(Boolean) |
為 COM 物件提供與版本無關的 GetGetMethod(Boolean) 方法之存取權。 |
備註
這個方法適用於從 Unmanaged 程式代碼存取 Managed 類別,不應從 Managed 程式代碼呼叫。
方法會 GetGetMethod 傳回 MethodInfo 物件,表示這個屬性的 get 存取子。
GetGetMethod()
為 COM 物件提供與版本無關的 GetGetMethod() 方法之存取權。
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。
備註
這個方法適用於從 Unmanaged 程式代碼存取 Managed 類別,不應從 Managed 程式代碼呼叫。
方法 GetGetMethod 會傳回這個屬性的公用 get 存取子。
適用於
GetGetMethod(Boolean)
為 COM 物件提供與版本無關的 GetGetMethod(Boolean) 方法之存取權。
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。
傳回
MethodInfo 物件,表示這個屬性的 get 存取子 (如果 nonPublic 參數為 true)。 如果 nonPublic 為 null 且 false 存取子為非公用,或如果 nonPublic 為 get 但沒有 true 存取子存在,則為 get。
備註
這個方法適用於從 Unmanaged 程式代碼存取 Managed 類別,不應從 Managed 程式代碼呼叫。
方法 GetGetMethod 會傳回此屬性的公用或非公用 get 存取子。