public Drawings Generate(int filterIndex, int quantity) { Drawings drawings = new Drawings(); for (int i = 0; i < quantity; i++) { while (true) { Numbers num = new Numbers(DefaultNumber).Generate(5, NumberMax, SpecialNumberMax, DefaultNumber, AllowRepeatedNums); if (!Drawings.Any(n => n.SameNumCombination(num))) { drawings.Add(num); break; } } } return(drawings); }