The basic idea of the tests are to try to exit the running process by calling Environment.Exit(int). The entry point, Main, denies UnmanagedCode from being executed. UnmanagedCode is required to call Environment.Exit(int). Then we try to call Environment.Exit(int) from other threads which "should" have inherited the restriction from the "main" (i.e. original) thread. This security stack "inheritance" is called "stack propagation". * delegate1.cs Use a static delegate to test stack propagation. * delegate2.cs Use an instance delegate to test stack propagation. * thread1.cs Deny unmanaged code before creating the thread object. * thread2.cs Deny unmanaged code after creating the thread object but before calling Start. * thread3.cs Deny unmanaged code after creating the thread object and calling Start. * timer1.cs: Use System.Threading.Timer (Thread.Start) to test stack propagation. * timer2.cs: Use System.Timers.Timer (ThreadPool.QueueUserWorkItem) to test stack propagation. * swf-timer3.cs: Use System.Timers.Timer (ThreadPool.QueueUserWorkItem) with a SynchonizingObject (like required for SWF) to test stack propagation. * swf-timer4.cs: Use System.Windows.Forms.Timer to test stack propagation. * swf-control1.cs: Use Control.BeginInvoke to test stack propagation. * tpool1.cs: Use ThreadPool.QueueUserWorkItem to test stack propagation. * tpool2.cs: Use ThreadPool.UnsafeQueueUserWorkItem to test non-propagation of the stack. Notes: * swf-*.cs test cases requires SWF (and it's dependancies) to be installed (and functional) to succeed.