Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
DefaultIfEmpty, ElementAt, ElementAtOrDefault, First, FirstOrDefault, Last, LastOrDefault, Single, and SingleOrDefault are all types of operators that return an individual element from a sequence or a default value if no element of a specific type exists.
The OrDefault variation of each of these operators (and DefaultIfEmpty) neatly handles the situation where an element cannot be found that satisfies the criteria, returning a default(T) result in these cases. The variations that don’t end with OrDefault throw an exception if no element satisfies the criteria.