Refuse request for ReflectionPermission : Permissions : Security C# Examples


C# Examples » Security » Permissions »

 

Refuse request for ReflectionPermission









    
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();

        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Security
» Permissions