WebPermission.IsSubsetOf determines whether the current WebPermission is a subset of the specified object.
Imports System.Text.RegularExpressions
Imports System.Net
Module Example
Public Sub Main()
Dim targetPermission As New WebPermission()
targetPermission.AddPermission(NetworkAccess.Connect, New Regex("www\.domain\.com/Public/.*"))
Dim connectPermission As New WebPermission()
connectPermission.AddPermission(NetworkAccess.Connect, "www.domain.com/Public/default.htm")
Console.WriteLine(("Is the second URI a subset of the first one?: " & connectPermission.IsSubsetOf(targetPermission)))
End Sub
End Module
Related examples in the same category