[Thread] Avoid using BinarySerialization
[mono.git] / mcs / class / corlib / System.Threading / ThreadAbortException.cs
index 26a6f2af7ec6d1d47a2dece70d6c1d3165dcf70e..19e5cba30bf1b16a617f60ddc5a35654399451c2 100644 (file)
 
 using System.Runtime.CompilerServices;
 using System.Runtime.Serialization;
+using System.Runtime.InteropServices;
 
 namespace System.Threading
 {
        [Serializable]
+       [ComVisible (true)]
        public sealed class ThreadAbortException : SystemException
        {
                private ThreadAbortException () : base ("Thread was being aborted")
@@ -47,10 +49,12 @@ namespace System.Threading
                {
                }
 
+#if !NET_2_1
                public object ExceptionState {
                        get {
-                               return Thread.CurrentThread.abort_state;
+                               return Thread.CurrentThread.GetAbortExceptionState ();
                        }
                }
+#endif
        }
 }