Redigera

Dela via


GacIdentityPermission.IsSubsetOf(IPermission) Method

Definition

Indicates whether the current permission is a subset of the specified permission.

public:
 override bool IsSubsetOf(System::Security::IPermission ^ target);
public override bool IsSubsetOf (System.Security.IPermission target);
override this.IsSubsetOf : System.Security.IPermission -> bool
Public Overrides Function IsSubsetOf (target As IPermission) As Boolean

Parameters

target
IPermission

A permission object to test for the subset relationship. The permission must be of the same type as the current permission.

Returns

true if the current permission is a subset of the specified permission; otherwise, false.

Exceptions

target is not null and is not of the same type as the current permission.

Remarks

The current permission is a subset of the specified permission if the current permission represents a set of operations that is wholly contained by the specified permission. If this method returns true, the current permission represents no more access to the protected resource than does the specified permission.

A GacIdentityPermission only supports set operations (the IsSubsetOf, Intersect, and Union methods) when the current permission is equal to the specified permission.

Applies to