Set File IO Permission to c:

image_pdfimage_print
   


using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Permissions;


class Program {
    static void Main(string[] args) {
        MyClass.Method();
    }
}

[FileIOPermission(SecurityAction.Assert, Read = "C:/")]
class MyClass {
    public static void Method() {
        // implementation goes here
    }
}

           
          


This entry was posted in File Stream. Bookmark the permalink.