Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SocketPermission.IsSubsetOf Method

Determines if the current permission is a subset of the specified permission.

Namespace:  System.Net
Assembly:  System (in System.dll)
abstract IsSubsetOf : 
        target:IPermission -> bool  
override IsSubsetOf : 
        target:IPermission -> bool

Parameters

target
Type: System.Security.IPermission

A SocketPermission that is to be tested for the subset relationship.

Return Value

Type: System.Boolean
If target is a null reference (Nothing in Visual Basic), this method returns true if the current instance defines no permissions; otherwise, false. If target is not a null reference (Nothing in Visual Basic), this method returns true if the current instance defines a subset of target permissions; otherwise, false.

Implements

IPermission.IsSubsetOf(IPermission)
ExceptionCondition
ArgumentException

target is not a SocketException.

SecurityException

DnsPermission is not granted to the method caller.

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 192.168.1.1:80 is a subset of a permission that represents access to 192.168.1.1:Any. If this method returns true, the current permission represents no more access to the protected resource than does the specified permission.

The following example uses the IsSubsetOf method to determine if one SocketPermission is the subset of another.

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

.NET Framework

Supported in: 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 Phone 8.1, Windows Phone 8, 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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.