System.Net.SocketPermission.ToXml Method

Creates an XML encoding of a System.Net.SocketPermission instance and its current state.

Syntax

public override System.Security.SecurityElement ToXml ()

Returns

A System.Security.SecurityElement instance that contains an XML-encoded representation of the System.Net.SocketPermission instance, including state information.

Remarks

The SocketPermission.ToXml method creates a System.Security.SecurityElement instance to encode a representation of the System.Net.SocketPermission instance, including state information, in XML.

Use the SocketPermission.FromXml(System.Security.SecurityElement) method to restore the state information from a System.Security.SecurityElement instance.

Requirements

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