語言

_PropertyInfo.GetSetMethod 方法

定義

提供 COM 物件對方法的版本無關存取 GetSetMethod 權。

多載

名稱 Description
GetSetMethod(Boolean)

提供 COM 物件對該方法的版本無關存取 GetSetMethod(Boolean) 權。

GetSetMethod()

提供 COM 物件對該方法的版本無關存取 GetSetMethod() 權。

備註

此方法用於存取非受管理程式碼中的受管理類別,不應從受管理程式碼呼叫。

這些方法回 GetSetMethod 傳 MethodInfo 一個物件,代表該屬性的 set 存取者。

GetSetMethod(Boolean)

提供 COM 物件對該方法的版本無關存取 GetSetMethod(Boolean) 權。

public:
 System::Reflection::MethodInfo ^ GetSetMethod(bool nonPublic);
public System.Reflection.MethodInfo GetSetMethod(bool nonPublic);
abstract member GetSetMethod : bool -> System.Reflection.MethodInfo
Public Function GetSetMethod (nonPublic As Boolean) As MethodInfo

參數

nonPublic
Boolean

true歸還非公開的配件;否則,。 false

傳回

以下表格中的其中一個數值。

價值 意義
一個 MethodInfo 代表此性質方法的 Set 物件。 set該 accessor 是公開的,或者nonPublic參數是 ,true而 set accessor 是非公開的。
null nonPublic參數為 true,但屬性為唯讀,或nonPublic參數為 且 falseset accessor 非公開,或不set存在 accessor。

備註

此方法用於存取非受管理程式碼中的受管理類別,不應從受管理程式碼呼叫。

該方法會 GetSetMethod 回傳 set 該屬性的存取器。

適用於

GetSetMethod()

提供 COM 物件對該方法的版本無關存取 GetSetMethod() 權。

public:
 System::Reflection::MethodInfo ^ GetSetMethod();
public System.Reflection.MethodInfo GetSetMethod();
abstract member GetSetMethod : unit -> System.Reflection.MethodInfo
Public Function GetSetMethod () As MethodInfo

傳回

MethodInfo代表此屬性方法的物件Set,若該set存取器是公開的,則nullset是該物件。

備註

此方法用於存取非受管理程式碼中的受管理類別,不應從受管理程式碼呼叫。

該方法回 GetSetMethod 傳該屬性的公共 set 存取器。

適用於