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

ToInt32() public static method

Extracts a Int32 from an instance of AtomicInteger.
/// Thrown if is . ///
public static ToInt32 ( AtomicInteger atomicInteger ) : int
atomicInteger AtomicInteger The to extract the value of.
return int
        public static int ToInt32(AtomicInteger atomicInteger)
        {
            if (atomicInteger == null)
            {
                throw new InvalidCastException();
            }

            return atomicInteger.value;
        }

Same methods

AtomicInteger::ToInt32 ( ) : int

Usage Example

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

            i.ToInt32().Should().Be(123);
        }
All Usage Examples Of OpenStory.Common.AtomicInteger::ToInt32