Example #1
0
 public static Boolean IfThen(ref UInt32 value, UInt32 @if, UInt32 then)
 {
     return(InterlockedEx.CompareExchange(ref value, then, @if) == @if);
 }
Example #2
0
 public static Boolean IfThen(ref UInt32 value, UInt32 @if, UInt32 then, out UInt32 previousValue)
 {
     previousValue = InterlockedEx.CompareExchange(ref value, then, @if);
     return(previousValue == @if);
 }