Adds the specified URI string with the specified access rights to the current WebPermission.
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
class MainClass
{
public static void Main()
{
WebPermission myWebPermission1 = new WebPermission();
myWebPermission1.AddPermission(NetworkAccess.Connect,"http://www.google.com/default.htm");
myWebPermission1.AddPermission(NetworkAccess.Connect,"http://www.works.com/default.htm");
myWebPermission1.Demand();
}
}
Related examples in the same category