FileIOPermission controls the ability to access files and folders : FileIOPermission « File Directory « VB.Net






FileIOPermission controls the ability to access files and folders

 
Imports System
Imports System.Security.Permissions



Imports System.Drawing
Imports System.Collections.Generic

Public Class Example
    Public Shared Sub Main()
        Dim f As New FileIOPermission(PermissionState.None)
        f.AllLocalFiles = FileIOPermissionAccess.Read
        Try
            f.Demand()
        Catch s As Exception
            Console.WriteLine(s.Message)
        End Try
    End Sub
End Class

   
  








Related examples in the same category