Get all the URIs with Accept permission
Imports System.Text.RegularExpressions
Imports System.Net
Imports System.Collections
Imports System.Collections.Generic
Module Example
Public Sub Main()
Dim myRegex As New Regex("http://www\.domain\.com/.*")
Dim myWebPermission As New WebPermission(NetworkAccess.Connect, myRegex)
myWebPermission.AddPermission(NetworkAccess.Connect, "http://www.domain.com")
myWebPermission.AddPermission(NetworkAccess.Accept, "http://www.domainA.com/")
myWebPermission.Demand()
Dim myAcceptEnum As IEnumerator = myWebPermission.AcceptList
While myAcceptEnum.MoveNext()
Console.WriteLine((ControlChars.Tab + myAcceptEnum.Current))
End While
End Sub
End Module
Related examples in the same category