Returns the logical union between two instances of the WebPermission class.
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);
WebPermission myWebPermission3 = (WebPermission)myWebPermission1.Union(myWebPermission2);
Console.WriteLine("\nAttributes and values of the WebPermission after the Union are : ");
Console.WriteLine(myWebPermission3.ToXml().ToString());
}
}