Demand FileIOPermissionAccess.AllAccess
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Security;
using System.Security.Permissions;
public class MainClass {
public static void Main() {
try {
FileIOPermission fileIOPermission = new FileIOPermission(FileIOPermissionAccess.AllAccess, @"c:\");
fileIOPermission.Demand();
} catch (SecurityException) {
}
}
}
Related examples in the same category