SecurityException.Method 屬性

定義

取得或設定與例外狀況關聯之方法的相關資訊。

public:
 property System::Reflection::MethodInfo ^ Method { System::Reflection::MethodInfo ^ get(); void set(System::Reflection::MethodInfo ^ value); };
public System.Reflection.MethodInfo? Method { get; set; }
public System.Reflection.MethodInfo Method { get; set; }
[System.Runtime.InteropServices.ComVisible(false)]
public System.Reflection.MethodInfo Method { get; set; }
member this.Method : System.Reflection.MethodInfo with get, set
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.Method : System.Reflection.MethodInfo with get, set
Public Property Method As MethodInfo

屬性值

描述方法的 MethodInfo 物件。

屬性

備註

重要

使用此物件的執行個體時,若並用了不信任的資料,會造成安全性上的風險。 使用此物件時,請一律使用信任的資料。 如需詳細資訊,請參閱 驗證所有輸入

此屬性包含下列其中一項:

  • 發生觸發例外狀況的安全性檢查時,失敗元件執行之方法的相關資訊。

  • 發生 PermitOnly 或 失敗時,在呼叫堆疊上放置 PermitOnlyDenyDeny 安全性動作的方法相關資訊。

  • null,在無法將 屬性設定為特定方法的失敗時。

物件 MethodInfo 提供可唯一識別方法的方法名稱、類別名稱和元件名稱資訊。

適用於