-->

Jul 2, 2014

First vs FirstOrDefault in LINQ

First vs FirstOrDefault in LINQ
S.NoFirstFirstOrDefault
1Gives first record from the collection, if collection doesn't have any object then throws error.FirstOrDefault extension method is used to retrieve the first element from the collection, if not then gives null