3 using System.Security.Permissions;
4 using System.Threading;
8 static void ThreadProc ()
11 Console.WriteLine (Environment.StackTrace);
16 catch (SecurityException se) {
18 Console.WriteLine ("EXPECTED SecurityException {0}", se);
24 // this Deny will prevent Environment.Exit from working
25 [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
26 static int Main (string[] args)
28 debug = (args.Length > 0);
29 Thread t = new Thread (new ThreadStart (ThreadProc));