Creates an XML encoding of a System.Net.SocketPermission instance and its current state.
A System.Security.SecurityElement instance that contains an XML-encoded representation of the System.Net.SocketPermission instance, including state information.
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.