FileIOPermission.IsSubsetOf(IPermission) FileIOPermission.IsSubsetOf(IPermission) FileIOPermission.IsSubsetOf(IPermission) FileIOPermission.IsSubsetOf(IPermission) Method

定义

确定当前权限是否为指定权限的子集。Determines 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

参数

target
IPermission IPermission IPermission IPermission

将要测试子集关系的权限。A permission that is to be tested for the subset relationship. 此权限必须与当前权限属于同一类型。This permission must be the same type as the current permission.

返回

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

异常

target 参数不为 null,并且与当前权限不属于同一类型。The target parameter is not null and is not of the same type as the current permission.

注解

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

适用于