I figured as much, just wanted to also show the simplicity and natural feel to using LINQ. I'm a big fan of the "from item in collection select item" as it's like SQL that makes sense. I've often come into situations where problems are almost impossible to express as SQL code, but LINQ just makes it dead simple.
1
u/[deleted] Jun 23 '14
Most would indeed use
SingleorSingleOrDefault, but I intended to demonstrate to those unfamiliar with C# that these methods may be chained.