2 using System
.Threading
;
3 public class DifferentialOperator
5 static void Main (string[] args
)
7 WeakReference weakref
= null;
8 Swap (ref weakref
, new object ());
10 throw new Exception ();
13 static void Swap(ref WeakReference refNmsp
, object o
)
15 WeakReference wref
= refNmsp
;
18 Console
.WriteLine ("Need this to make it pass");
20 Interlocked
.CompareExchange
<WeakReference
>(ref refNmsp
, new WeakReference(o
), wref
);