3 using System.Security.Permissions;
4 using System.Threading;
8 static void ThreadProc ()
11 Console.WriteLine (Environment.StackTrace);
17 Console.WriteLine ("UNEXPECTED execution");
19 catch (SecurityException se) {
20 Console.WriteLine ("UNEXPECTED SecurityException {0}", se);
26 // this Deny _WONT_ prevent Environment.Exit from working
27 // even if the Deny is executed prior to the call
28 [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
35 static int Main (string[] args)
37 debug = (args.Length > 0);
38 Thread t = new Thread (new ThreadStart (ThreadProc));