IsUnrestricted Method
Collapse the table of content
Expand the table of content

IUnrestrictedPermission.IsUnrestricted Method ()


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
© 2015 Microsoft