public static int PK10_1FS(string LotteryNumber, string CheckNumber)
        {
            int num = 0;

            if (!new Regex("^[_0-9]+$").IsMatch(CheckNumber))
            {
                return(0);
            }
            string[] strArray1 = CheckNumber.Split('_');
            for (int index = 0; index < strArray1.Length; ++index)
            {
                if (string.IsNullOrEmpty(strArray1[index]) || CheckPK10_1Start.SubstringCount(CheckNumber, strArray1[index]) > 1 || strArray1[index].Length != 2)
                {
                    return(0);
                }
            }
            string[] strArray2 = LotteryNumber.Split(',');
            for (int index = 0; index < strArray1.Length; ++index)
            {
                string str = strArray1[index];
                if (strArray2[0].IndexOf(str) != -1)
                {
                    ++num;
                }
            }
            return(num);
        }
Beispiel #2
0
        public static int PK10_1FS(string LotteryNumber, string CheckNumber)
        {
            int   num   = 0;
            Regex regex = new Regex("^[_0-9]+$");

            if (!regex.IsMatch(CheckNumber))
            {
                return(0);
            }
            string[] array = CheckNumber.Split(new char[]
            {
                '_'
            });
            for (int i = 0; i < array.Length; i++)
            {
                if (string.IsNullOrEmpty(array[i]))
                {
                    return(0);
                }
                if (CheckPK10_1Start.SubstringCount(CheckNumber, array[i]) > 1)
                {
                    return(0);
                }
                if (array[i].Length != 2)
                {
                    return(0);
                }
            }
            string[] array2 = LotteryNumber.Split(new char[]
            {
                ','
            });
            for (int j = 0; j < array.Length; j++)
            {
                string value = array[j];
                if (array2[0].IndexOf(value) != -1)
                {
                    num++;
                }
            }
            return(num);
        }