List<T>.Find() returns the first element found that matches a given criteria. So lets say we have List<int> and we use the Find method on it. What will be the returned value? If a number in the list matches the criteria it will be returned, but what if not? what does the variable zero contains after executing this code:
List<int> listOfInts = new List<int>(new int[] { 1,2,3,4,5,6,7,8,9}); int zero = listOfInts.Find( delegate(int i) { return i == 0; });
It has the value of…
We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution
Learn More