Network C#

using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
class MainClass
{
   public static void Main()
   {
    WebPermission myWebPermission1 = new WebPermission(NetworkAccess.Connect,"http://www.google.com");
    myWebPermission1.Demand();
   }
}