/// <summary> /// Atomically set the value to the given updated value if the current value == the expected value. /// </summary> /// <param name="expectedSequence">the expected value for the sequence</param> /// <param name="nextSequence">the new value for the sequence</param> /// <returns>true if successful. False return indicates that the actual value was not equal to the expected value.</returns> public bool CompareAndSet(long expectedSequence, long nextSequence) { return(_value.CompareAndSet(expectedSequence, nextSequence)); }