A declarative role-based security demand for the current principal : Permissions : Security C# Examples


C# Examples » Security » Permissions »

 

A declarative role-based security demand for the current principal









    
using  System;
using  System.Security.Permissions;

class  MainClass
{
        [PrincipalPermission(SecurityAction.Demand,  Name  =  @"MACHINE\Joe",  Role  =  @"MACHINE\Managers")]
        public  static  void  MyMethod()
        {
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Security
» Permissions