new PrincipalPermission()
using System;
using System.Security.Permissions;
class MainClass
{
public static void MyMethod()
{
PrincipalPermission perm = new PrincipalPermission(@"MACHINE\Joe", @"MACHINE\Managers");
perm.Demand();
}
}
Related examples in the same category