public CardLine(string line, HashSet <int> numbersToCheck) { var lineNumbers = line.Split(','); foreach (var number in lineNumbers) { Numbers.Add(int.Parse(number), numbersToCheck.Contains(int.Parse(number))); } Bingo = Numbers.All(number => number.Value); }