OpenStory.Common.AtomicInteger.Decrement C# (CSharp) Method

Decrement() public method

Decrements the value of this AtomicInteger by one and returns the new value.
public Decrement ( ) : int
return int
        public int Decrement()
        {
            return Interlocked.Decrement(ref this.value);
        }

Usage Example

Exemplo n.º 1
0
        public void Decrement_Should_Set_Decreased_Value()
        {
            var i = new AtomicInteger(123);

            i.Decrement();

            i.Value.Should().Be(122);
        }
All Usage Examples Of OpenStory.Common.AtomicInteger::Decrement