Export (0) Print
Expand All

CodeAccessPermission.IsSubsetOf Method

When implemented by a derived class, determines whether the current permission is a subset of the specified permission.

[Visual Basic]
Public MustOverride Function IsSubsetOf( _
   ByVal target As IPermission _
) As Boolean Implements IPermission.IsSubsetOf
[C#]
public abstract bool IsSubsetOf(
 IPermission target
);
[C++]
public: virtual bool IsSubsetOf(
 IPermission* target
) = 0;
[JScript]
public abstract function IsSubsetOf(
   target : IPermission
) : Boolean;

Parameters

target
A permission that is to be tested for the subset relationship. This permission must be of the same type as the current permission.

Return Value

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

Implements

IPermission.IsSubsetOf

Exceptions

Exception Type Condition
ArgumentException The target parameter is not a null reference (Nothing in Visual Basic) 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 specifies a set of operations that is wholly contained by the specified permission. For example, a permission that represents access to C:\example.txt is a subset of a permission that represents access to C:\. If this method returns true, the current permission represents no more access to the protected resource than does the specified permission.

Notes to Inheritors:  You must implement this method in a derived class.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard

See Also

CodeAccessPermission Class | CodeAccessPermission Members | System.Security Namespace

Show:
© 2014 Microsoft