Mono Class Library: System.Security.CodeAccessPermission Overview | Members

System.Security.CodeAccessPermission.IsSubsetOf Method

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

public abstract bool IsSubsetOf (IPermission target)

Parameters

target
A System.Security.CodeAccessPermission instance that is to be tested for the subset relationship.

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 .

Exceptions

TypeReason
ArgumentExceptiontarget is not null and is not of type System.Security.CodeAccessPermission .

Remarks

Note: This method is implemented to support the System.Security.IPermission interface.

Operation
As described above.

Note to Inheritors
Override this method to implement the test for the subset relationship in types derived from System.Security.CodeAccessPermission .

Usage

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.

If this method returns true , the current instance does not describe a level of access to a set of resources that is not already described by target.

Requirements

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