Reconstructs a WebPermission from an XML encoding.
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Security.Permissions;
class MainClass
{
publicstaticvoid Main()
{
WebPermission myWebPermission1 = new WebPermission(PermissionState.None);
Console.WriteLine("Attributes and Values of the WebPermission are :");
myWebPermission1.ToXml().ToString();
WebPermission myWebPermission2 = new WebPermission(PermissionState.None);
myWebPermission2.FromXml(myWebPermission1.ToXml());
}
}