Share via


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

備註

不受限制的許可權代表許可權所保護之所有資源的存取權。

適用於