FileIOPermissionAccess.Write : FileIOPermissionAccess « System.Security.Permissions « C# / C Sharp by API






FileIOPermissionAccess.Write

   


using System;
using System.Net;
using System.Security.Permissions;


[assembly: ReflectionPermission(SecurityAction.RequestRefuse, Unrestricted = true)]
class MainClass
{
    public static void Main()
    {
        FileIOPermission fileIOPerm = new FileIOPermission(FileIOPermissionAccess.Write, @"C:\Data");

        fileIOPerm.Demand();

    }
}

   
    
    
  








Related examples in the same category

1.FileIOPermissionAccess.AllAccess
2.FileIOPermissionAccess.Append
3.FileIOPermissionAccess.Read