PermissionSet.IsUnrestricted 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷 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
傳回
如果 PermissionSet 為 Unrestricted
,則為 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 介面的所有許可權。