var numbers = new NumberList<int> { 0, 1, 2, 3, 4, 5 }; foreach (int num in numbers) { DoSomething(); }