I got a simple List of ints.
List myInts = new List();
myInts.Add(0);
myInts.Add(1);
myInts.Add(4);
myInts.Add(6);
myInts.Add(24);
Well, if the list is ordered from smallest to largest and contains values from 0 to positive infinity, you could simply access the i-th element. if (myInts[i] != i) return i;
which would be essentially the same, but doesn't necessitate iterating through the list for each and every Contains
check (the Contains method iterates through the list, turning your algorithm into an O(n-squared) rather than O(n)).