SecurityPermissionAttribute.Execution 属性

定义

获取或设置一个值,该值指示是否声明了执行代码的权限。Gets or sets a value indicating whether permission to execute code is declared.

public:
 property bool Execution { bool get(); void set(bool value); };
public bool Execution { get; set; }
member this.Execution : bool with get, set
Public Property Execution As Boolean

属性值

Boolean

如果声明了执行代码的权限,则为 true;否则为 falsetrue if permission to execute code is declared; otherwise, false.

注解

Execution 程序集级别的权限请求被忽略。A demand for Execution permission at the assembly level is ignored. 如果程序集有权执行, Execution 则会自动授予权限,并将属性设置 Executiontruefalse 不起作用。If an assembly has the right to execute, Execution permission is automatically granted, and setting the Execution property to either true or false has no effect.

适用于