In my previous post Single vs SingleOrDefault, we talk about Single and SingleOrDefault method and difference between these methods. In this post we are going to explore two more extension methods First and FirstOrDefault.
You can find some other useful topics and posts here. Below is a chart explaining about First() and FirstOrDefault(). You can easily differentiate these methods from this chart. I have also given examples of each method.
You can find some other useful topics and posts here. Below is a chart explaining about First() and FirstOrDefault(). You can easily differentiate these methods from this chart. I have also given examples of each method.