public int CountOfIntersect(NumberItem ni) { int c = 0; foreach (int a in nums) { if (ni.HasMember(a)) { c++; } } return(c); }
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)); }