System.Xml.XmlConverter.ToInt32D7 C# (CSharp) Method

ToInt32D7() private static method

private static ToInt32D7 ( byte chars, int offset, int count ) : int
chars byte
offset int
count int
return int
        private static int ToInt32D7(byte[] chars, int offset, int count)
        {
            int value = 0;
            for (int i = 0; i < count; i++)
            {
                byte ch = (byte)(chars[offset + i] - '0');
                if (ch > 9)
                    return -1;
                value = value * 10 + ch;
            }
            return value;
        }