Adding items to a generic list (novice)
Posted
by
Crash893
on Stack Overflow
See other posts from Stack Overflow
or by Crash893
Published on 2011-02-16T22:44:09Z
Indexed on
2011/02/16
23:25 UTC
Read the original article
Hit count: 211
I'm some what embarrassed to even ask this but I know there is a better way to do this I just don't know how
List<int> numbers = new List<int>(22);
numbers.Add(3);
numbers.Add(4);
numbers.Add(9);
numbers.Add(14);
numbers.Add(15);
numbers.Add(19);
numbers.Add(28);
numbers.Add(37);
numbers.Add(47);
numbers.Add(50);
numbers.Add(54);
numbers.Add(56);
numbers.Add(59);
numbers.Add(61);
numbers.Add(70);
numbers.Add(73);
numbers.Add(78);
numbers.Add(81);
numbers.Add(92);
numbers.Add(95);
numbers.Add(97);
numbers.Add(99);
© Stack Overflow or respective owner