CSL.BEncoding.decode_int C# (CSharp) 메소드

decode_int() 개인적인 정적인 메소드

private static decode_int ( byte x, int &f ) : int
x byte
f int
리턴 int
        private static int decode_int(byte[] x, ref int f)
        {
            string s = "";
            while (x[f] != 'e')
            {
                s += (char)x[f];
                f++;
            }
            f++;

            Regex r = new Regex("^(0|-?[1-9][0-9]*)$", RegexOptions.Compiled);

            //if (!r.IsMatch(s))
                //throw new BitTorrentException("Integer value is invalid");

            return int.Parse(s);
        }