示例#1
0
        public int CountOfIntersect(NumberItem ni)
        {
            int c = 0;

            foreach (int a in nums)
            {
                if (ni.HasMember(a))
                {
                    c++;
                }
            }
            return(c);
        }
示例#2
0
        public string CountOfIntersect2(NumberItem ni)
        {
            int c1 = 0;
            int c2 = 0;
            int ca = 0;

            ca = 0;
            foreach (int a in nums)
            {
                ca++;
                if (ni.HasMember(a))
                {
                    if (ca >= 5 && ca <= 15)
                    {
                        c1++;
                    }
                    else
                    {
                        c2++;
                    }
                }
            }
            return(string.Format("{0}:{1}", c1, c2));
        }