CSharp examples for File IO:Permission
Create and configure a FileIOPermission object that represents write access to the a folder.
using System.Security; using System.Security.Permissions; class MainClass// w w w. ja va 2s . co m { private bool canWrite = false; public static void Main() { FileIOPermission fileIOPerm = new FileIOPermission(FileIOPermissionAccess.Write, @"C:\Data"); bool canWrite = SecurityManager.IsGranted(fileIOPerm); } }