System.Numerics.BigNumber.TryParseBigInteger C# (CSharp) 메소드

TryParseBigInteger() 개인적인 메소드

private TryParseBigInteger ( string value, NumberStyles style, NumberFormatInfo info, System.Numerics.BigInteger &result ) : bool
value string
style NumberStyles
info System.Globalization.NumberFormatInfo
result System.Numerics.BigInteger
리턴 bool
        internal static bool TryParseBigInteger(string value, NumberStyles style, NumberFormatInfo info, out BigInteger result)
        {
            unsafe
            {
                result = BigInteger.Zero;
                ArgumentException e;
                if (!TryValidateParseStyleInteger(style, out e))
                    throw e; // TryParse still throws ArgumentException on invalid NumberStyles

                BigNumberBuffer bignumber = BigNumberBuffer.Create();
                if (!FormatProvider.TryStringToBigInteger(value, style, info, bignumber.digits, out bignumber.precision, out bignumber.scale, out bignumber.sign))
                    return false;

                if ((style & NumberStyles.AllowHexSpecifier) != 0)
                {
                    if (!HexNumberToBigInteger(ref bignumber, ref result))
                    {
                        return false;
                    }
                }
                else
                {
                    if (!NumberToBigInteger(ref bignumber, ref result))
                    {
                        return false;
                    }
                }
                return true;
            }
        }