Bite-Size .NET 6 - LINQ OrDefault() Overloads

added by DotNetKicks
10/18/2021 4:06:53 PM

396 Views

A nice new overload is coming to LINQ's OrDefault methods (e.g. FirstOrDefault()), so let's check it out! In prior versions of .NET, we could use methods such as FirstOrDefault() to specify that we wanted the first element in a collection, or the default value of the element's type.


0 comments