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 方法的对象。

属性

注解

Important

将此类型的实例用于不受信任的数据是一种安全风险。 仅将此对象与受信任的数据一起使用。 有关详细信息,请参阅验证所有输入

此属性包含以下属性之一:

  • 当触发异常的安全检查时,有关失败程序集执行的方法的信息。

  • 有关在调用堆栈上放置某个PermitOnlyDeny安全操作的方法的信息,以防由于PermitOnly或 。Deny

  • 如果失败无法归因于特定方法,则为

MethodInfo 对象提供唯一标识方法的方法名称、类名称和程序集名称信息。

适用于