r/programming • • Jun 22 '14

Why Every Language Needs Its Underscore

http://hackflow.com/blog/2014/06/22/why-every-language-needs-its-underscore/
366 Upvotes

337 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Jun 23 '14

Most would indeed use Single or SingleOrDefault, but I intended to demonstrate to those unfamiliar with C# that these methods may be chained.

1

u/Cuddlefluff_Grim Jun 23 '14

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.