PermissionSet.IsUnrestricted Method


Determines whether the PermissionSet is Unrestricted.

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


true if the PermissionSet is Unrestricted; otherwise, false.


The following code example shows the use of the IsUnrestricted method. This code example is part of a larger example provided for the PermissionSet class.

// 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())


An UnrestrictedPermissionSet effectively contains all permissions that implement the IUnrestrictedPermission interface.

Applies to