SocketPermission.FromXml Method (SecurityElement)

 

Reconstructs a SocketPermission instance for an XML encoding.

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

override FromXml : 
        securityElement:SecurityElement -> unit

Parameters

securityElement
Type: System.Security.SecurityElement

The XML encoding used to reconstruct the SocketPermission instance.

Exception Condition
ArgumentNullException

The securityElement is null.

ArgumentException

The securityElement is not a permission element for this type.

The FromXml method reconstructs a SocketPermission instance from an XML encoding defined by the SecurityElement class.

Use the ToXml method to encode the SocketPermission instance, including state information, in XML.

The following example uses the FromXml method to convert XML encoded data to a SocketPermission instance.

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

.NET Framework
Available since 1.1
Return to top
Show: