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 接口的所有权限。

适用于