...in LINQ is a lot like .FirstOrDefault. If you are familiar with .FirstOrDefault you can probably guess what .SingleOrDefault does, huh?
- It will return the default value for the type if there are no matches.
- It will return what it finds if there is one match.
- It will throw an exception if there is more than one match.
No comments:
Post a Comment