/// <summary> /// 分析一个投注号码,计算此号码所包含的注数。 /// 投注号码格式错误时抛出异常AntecodeFormatException。 /// </summary> /// <param name="antecode">投注号码</param> /// <returns>号码所包含的注数</returns> public int AnalyzeAnteCode(string antecode) { string msg; if (!CheckAntecode(antecode, out msg)) { throw new AntecodeFormatException(GameCode, GameType, antecode, "投注号码格式错误 - " + msg); } int i = 0; var p = new Permutation(); p.Calculate(AnteCodeNumbers, BallNumber, (item) => { i++; }); return(i); }