SecurityPermissionAttribute.SkipVerification 属性

获取或设置一个值,该值指示是否声明了跳过代码验证的权限。

**命名空间:**System.Security.Permissions
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
Public Property SkipVerification As Boolean
用法
Dim instance As SecurityPermissionAttribute
Dim value As Boolean

value = instance.SkipVerification

instance.SkipVerification = value
public bool SkipVerification { get; set; }
public:
property bool SkipVerification {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_SkipVerification ()

/** @property */
public void set_SkipVerification (boolean value)
public function get SkipVerification () : boolean

public function set SkipVerification (value : boolean)

属性值

如果声明了跳过代码验证的权限,则为 true;否则为 false

备注

警告

这是一项功能非常强大的权限,应只授予高度信任的代码。

有关如何使用 SkipVerification 的信息,请参见 类型安全和安全性

示例

下面的代码示例演示如何使用 SkipVerification 属性拒绝跳过代码验证的能力。有关完整的代码示例,请参见 SecurityPermissionAttribute 类。

' Set the Assertion,UnmanagedCode, ControlAppDomain, ControlDomainPolicy, ontrolEvidence, 
' ControlPolicy, ControlPrincipal, ControlThread, Execution, Flags, Infrastructure, 
' RemotingConfiguration, SerializationFormatter, and SkipVerification properties.
<SecurityPermissionAttribute(SecurityAction.Deny, Assertion:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, ControlAppDomain:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, ControlDomainPolicy:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, ControlEvidence:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, ControlPolicy:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, ControlPrincipal:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, ControlThread:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, Execution:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, Flags:=SecurityPermissionFlag.NoFlags), _
SecurityPermissionAttribute(SecurityAction.Deny, Infrastructure:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, RemotingConfiguration:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, SerializationFormatter:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, SkipVerification:=True), _
SecurityPermissionAttribute(SecurityAction.Deny, UnmanagedCode:=True)> _
Public Shared Sub DenySecurityPermissions()
    // Set the SkipVerification property.
[SecurityPermissionAttribute(SecurityAction.Deny, SkipVerification = true)]
// Set the SkipVerification property.
[SecurityPermissionAttribute(SecurityAction::Deny,SkipVerification=true)]
// Set the SkipVerification property.
/** @attribute SecurityPermissionAttribute(SecurityAction.Deny, 
    SkipVerification = true)
 */

平台

Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

SecurityPermissionAttribute 类
SecurityPermissionAttribute 成员
System.Security.Permissions 命名空间

其他资源

类型安全和安全性