Playtomic.JSON.ParseNumber C# (CSharp) 메소드

ParseNumber() 보호된 메소드

protected ParseNumber ( char json, int &index ) : double
json char
index int
리턴 double
        protected double ParseNumber(char[] json, ref int index)
        {
            EatWhitespace(json, ref index);

            int lastIndex = GetLastIndexOfNumber(json, index);
            int charLength = (lastIndex - index) + 1;
            char[] numberCharArray = new char[charLength];

            Array.Copy(json, index, numberCharArray, 0, charLength);
            index = lastIndex + 1;
            return Double.Parse(new string(numberCharArray), CultureInfo.InvariantCulture);
        }