Probably the most frequent LINQ mistake

First always throws an exception if the collection does not contain the specified element. If you know that the element might not exist in the collection, use FirstOrDefault
Print | posted on Thursday, January 12, 2012 11:13 PM

Feedback

No comments posted yet.
Title  
Name
Email (never displayed)
Url
Comments   
Please add 1 and 4 and type the answer here: