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:
    virtual bool IsUnrestricted()
    {
        // This means that the object is unrestricted at runtime.
        return stateFlags == SoundPermissionState::PlayAnySound;
    }

.NET Framework
Available since 1.1
Return to top
Show: