2 using System
.Threading
;
4 class Impl
<T
> where T
: class
6 public static object CompareExchangeImpl (TypedReference tr
, object value, object comparand
)
8 return Interlocked
.CompareExchange (ref __refvalue(tr
, T
), (T
) value, (T
) comparand
);
14 public static void Main ()
17 var tr
= __makeref (obj
);
18 Impl
<string>.CompareExchangeImpl (tr
, "foo", null);