DataProtectionPermission.IsUnrestricted 方法

定义

返回一个值,该值指示当前权限是否不受限制。

public:
 virtual bool IsUnrestricted();
public bool IsUnrestricted ();
abstract member IsUnrestricted : unit -> bool
override this.IsUnrestricted : unit -> bool
Public Function IsUnrestricted () As Boolean

返回

如果当前权限不受限制,则为 true;否则为 false

实现

示例

下面的代码示例演示如何使用 IsUnrestricted 方法。 此代码示例是为 DataProtectionPermission 类提供的一个更大示例的一部分。

rc = sp3->IsUnrestricted();
Console::WriteLine( "Is the third permission unrestricted? {0}", (rc ? (String^)"Yes" : "No") );
rc = sp3.IsUnrestricted();
Console.WriteLine("Is the third permission unrestricted? " +
    (rc ? "Yes" : "No"));
rc = sp3.IsUnrestricted()
Console.WriteLine("Is the third permission unrestricted? " + IIf(rc, "Yes", "No")) 'TODO: For performance reasons this should be changed to nested IF statements

注解

不受限制的权限表示对受权限保护的所有资源的访问。

适用于