System.Net.SocketPermission.FromXml Method

Reconstructs a System.Net.SocketPermission instance for an XML encoding.

Syntax

public override void FromXml (System.Security.SecurityElement securityElement)

Parameters

securityElement
The XML encoding used to reconstruct the System.Net.SocketPermission instance.

Exceptions

TypeReason
ArgumentNullException securityElement is null.
ArgumentException securityElement is not a System.Net.SocketPermission permission element.

Remarks

The SocketPermission.FromXml(System.Security.SecurityElement) method reconstructs a System.Net.SocketPermission instance from an XML encoding defined by the System.Security.SecurityElement class.

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

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0