Export (0) Print
Expand All

WebPermission.IsSubsetOf Method

Determines whether the current WebPermission is a subset of the specified object.

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

abstract IsSubsetOf : 
        target:IPermission -> bool  
override IsSubsetOf : 
        target:IPermission -> bool

Parameters

target
Type: System.Security.IPermission

The WebPermission to compare to the current WebPermission.

Return Value

Type: System.Boolean
true if the current instance is a subset of the target parameter; otherwise, false. If the target is a null reference (Nothing in Visual Basic), the method returns true for an empty current permission that is not unrestricted and false otherwise.

Implements

IPermission.IsSubsetOf(IPermission)

ExceptionCondition
ArgumentException

The target parameter is not an instance of WebPermission.

NotSupportedException

The current instance contains a Regex-encoded right and there is not exactly the same right found in the target instance.

If the current WebPermission specifies a set of associated resources that is wholly contained by the target parameter, then the current WebPermission is a subset of target. This method overrides IsSubsetOf and is implemented to support the IPermission interface.

The following example uses IsSubsetOf to determine whether the access rights found in one instance of WebPermission are found in another instance of WebPermission.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft