OpenStory.Common.AtomicInteger.ToInt32 C# (CSharp) Метод

ToInt32() публичный статический Метод

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.
Результат int
        public static int ToInt32(AtomicInteger atomicInteger)
        {
            if (atomicInteger == null)
            {
                throw new InvalidCastException();
            }

            return atomicInteger.value;
        }

Same methods

AtomicInteger::ToInt32 ( ) : int

Usage Example

Пример #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