BigInteger.BigInteger C# (CSharp) Method

BigInteger() public method

public BigInteger ( ulong value ) : System
value ulong
return System
        public BigInteger(ulong value)
        {
                data = new uint[maxLength];

                // copy bytes from ulong to BigInteger without any assumption of
                // the length of the ulong datatype

                dataLength = 0;
                while(value != 0 && dataLength < maxLength)
                {
                        data[dataLength] = (uint)(value & 0xFFFFFFFF);
                        value >>= 32;
                        dataLength++;
                }

                if(value != 0 || (data[maxLength-1] & 0x80000000) != 0)
                        throw(new ArithmeticException("Positive overflow in constructor."));

                if(dataLength == 0)
                        dataLength = 1;
        }

Same methods

BigInteger::BigInteger ( ) : System
BigInteger::BigInteger ( BigInteger, bi ) : System
BigInteger::BigInteger ( byte inData ) : System
BigInteger::BigInteger ( byte inData, int inLen ) : System
BigInteger::BigInteger ( long value ) : System
BigInteger::BigInteger ( string value, int radix ) : System
BigInteger::BigInteger ( uint inData ) : System