IUnrestrictedPermission.IsUnrestricted Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns a value indicating whether unrestricted access to the resource protected by the permission is allowed.

Namespace:   System.Security.Permissions
Assembly:  mscorlib (in mscorlib.dll)

bool IsUnrestricted()

Return Value

Type: System.Boolean

true if unrestricted use of the resource protected by the permission is allowed; otherwise, false.

The following code example demonstrates implementing the IsUnrestricted method. This code example is part of a larger example provided for the IUnrestrictedPermission class.

// Returns true if permission is effectively unrestricted.
public Boolean IsUnrestricted()
    // This means that the object is unrestricted at runtime.
    return m_flags == SoundPermissionState.PlayAnySound;

.NET Framework
Available since 1.1
Return to top