Mono Class Library: System.Security.Permissions.SecurityPermission Overview | Members

System.Security.Permissions.SecurityPermission.IsSubsetOf Method

Determines whether the current instance is a subset of the specified object.

public override bool IsSubsetOf (System.Security.IPermission target)

Parameters

target
A System.Security.Permissions.SecurityPermission object of the same type as the current instance that is to be tested for the subset relationship with the current instance.

Returns

true if the current instance is a subset of target ; otherwise, false. If the current instance is unrestricted, and target is not, returns false. If target is unrestricted, returns true. If target is null and the current instance was initialized with SecurityPermissionFlag.NoFlags, returns true. If target is null and the current instance was initialized with any value other than NoFlags, returns false .

Exceptions

TypeReason
ArgumentExceptiontarget is not null and is not of type System.Security.Permissions.SecurityPermission .

Remarks

Note:

The current instance is a subset of target if the current instance specifies a set of accesses to resources that is wholly contained by target. For example, a permission that represents read access to a file is a subset of a permission that represents read and write access to the file.

This method overrides System.Security.CodeAccessPermission.IsSubsetOf(System.Security.IPermission) and is implemented to support the System.Security.IPermission interface.

Requirements

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0