3 using System.Security.Permissions;
5 [assembly: SecurityPermission (SecurityAction.RequestRefuse, ControlPrincipal=true)]
9 [SecurityPermission (SecurityAction.LinkDemand, ControlPrincipal=true)]
10 public static int Test ()
15 // we throw as soon as we try to compile this
16 static void DeepTest ()
21 // no problem compiling Test as linking to DeepTest is possible
22 static void Test (int i)
34 for (i=0; i < 256; i++) {
37 Console.WriteLine ("*{0}* Iteration Completed", err);
39 catch (SecurityException) {
40 err = (i == 200) ? 0 : 1;
41 Console.WriteLine ("*{0}* Iteration Count: {1}", err, i);