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 void Start (Thread t)
31 static int Main (string[] args)
33 debug = (args.Length > 0);
34 Thread t = new Thread (new ThreadStart (ThreadProc));