// Split the string into individual words to create a collection.
string[] words = "the quick brown fox jumps over the lazy dog".Split(' ');

// Using query expression syntax.
var query = from word in words
	group word.ToUpper() by word.Length into gr
	orderby gr.Key
	select new { Length = gr.Key, Words = gr };

// Using method-based query syntax.
var query2 = words
	.GroupBy(w => w.Length, w => w.ToUpper())
	.Select(g => new { Length = g.Key, Words = g })
	.OrderBy(o => o.Length);

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/17969c8f-f0b5-4855-affd-97dfdec81fea/Untitled.png

Deferred Execution

Cast<TResult>() & OfType<TResult>()

var list = new List<DerivedClass>();
IEnumerable<BaseClass> baseClassList1 = list.Cast<BaseClass>();
IEnumerable<BaseClass> baseClassList2 = list.OfType<BaseClass>();

First() & Single()