共用方式為


PermissionSet.IsUnrestricted 方法

定義

判斷 PermissionSet 是否 Unrestricted

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

傳回

如果 PermissionSetUnrestricted,則為 true ;否則,false

範例

下列程式代碼範例示範如何使用 IsUnrestricted 方法。 此程式代碼範例是提供給 PermissionSet 類別之較大範例的一部分。

// Check for an unrestricted permission set.
PermissionSet^ ps7 = gcnew PermissionSet( PermissionState::Unrestricted );
Console::WriteLine( "Permission set is unrestricted = {0}", ps7->IsUnrestricted() );
// Check for an unrestricted permission set.
PermissionSet ps7 = new PermissionSet(PermissionState.Unrestricted);
Console.WriteLine("Permission set is unrestricted = " + ps7.IsUnrestricted());
' Check for an unrestricted permission set.
Dim ps7 As New PermissionSet(PermissionState.Unrestricted)
Console.WriteLine("Permission set is unrestricted = " & ps7.IsUnrestricted())

備註

Unrestricted PermissionSet 實際上包含實作 IUnrestrictedPermission 介面的所有許可權。

適用於