-->

Jun 30, 2014

Last vs LastOrDefault in LINQ

Last vs LastOrDefault in LINQ
S.NoLastLastOrDefaulf
1Last extension method gives last element from the collection. If there is no element in the collection, it throws error.LastOrDefault extension method gives the last element form the collection, if not gives null.