ConfigurationPermission.IsSubsetOf Method (IPermission)

 

Compares the ConfigurationPermission object with an object implementing the IPermission interface.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

public override bool IsSubsetOf(
	IPermission target
)

Parameters

target
Type: System.Security.IPermission

The object to compare to.

Return Value

Type: System.Boolean

true if the permission state is equal; otherwise, false.

Exception Condition
ArgumentException

target is not typed as ConfigurationPermission.

Although the method signature accepts any object that implements the IPermission interface, an ArgumentException exception will be thrown if calling the GetType method on the object referenced by the target parameter does not return System.Configuration.ConfigurationPermission.

If the object referenced by the target parameter is null, the comparison is done between the permission state of the ConfigurationPermission object and the None value of the PermissionState enumeration.

.NET Framework
Available since 2.0
Return to top
Show: