DBDataPermission.IsSubsetOf(IPermission) DBDataPermission.IsSubsetOf(IPermission) DBDataPermission.IsSubsetOf(IPermission) DBDataPermission.IsSubsetOf(IPermission) Method

定义

返回一个值,该值指示当前的权限对象是否为指定权限对象的一个子集。Returns a value indicating whether the current permission object is a subset of the specified permission object.

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

参数

target
IPermission IPermission IPermission IPermission

将用于测试子集关系的权限对象。A permission object that is to be tested for the subset relationship. 该对象必须与当前权限对象的类型相同。This object must be of the same type as the current permission object.

返回

如果当前权限对象是指定权限对象的子集,则为 true;否则为 falsetrue if the current permission object is a subset of the specified permission object, otherwise false.

异常

target 参数是一个与当前权限对象的类型不同的对象。The target parameter is an object that is not of the same type as the current permission object.

注解

如果当前权限对象指定的一组操作完全包含在指定的权限对象中,则当前权限对象是指定权限对象的子集。The current permission object is a subset of the specified permission object if the current permission object specifies a set of operations that is wholly contained by the specified permission object. 例如,表示对 C:\example.txt 的访问权限的权限是表示 C:\访问权限的权限的子集。For example, a permission that represents access to C:\example.txt is a subset of a permission that represents access to C:\. 如果此方法返回true,则当前权限对象表示对受保护资源的访问权限,而不是指定的权限对象。If this method returns true, the current permission object represents no more access to the protected resource than does the specified permission object.

适用于

另请参阅