Initializes a new instance of the WebPermission class with the specified access rights for the specified URI.
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
class MainClass
{
publicstaticvoid Main()
{
WebPermission myWebPermission1 = new WebPermission(NetworkAccess.Connect,"http://www.google.com");
myWebPermission1.Demand();
}
}