although my code passes the test below, it cant delete a file and generates unauthorizedaccessexption. do you know why?
FileIOPermission filePermission = new
FileIOPermission(FileIOPermissionAccess.AllAccess,
@"C:\helloworld.txt");
try
{
filePermission.Demand();
MessageBox.Show ("Permission demand successful");
}
catch( SecurityException securityEx )
{
MessageBox.Show( securityEx.Message, "Security Exception" );
}