Simplify Syntax with Extension Methods

Extension methods were first introduced with LINQ in C#3.0. They are just a syntactic construct, but as we’ll see in this post they can make a huge difference. What’s easier to read of these two? string[] wishList1 = Enumerable.ToArray( Enumerable.Select(Enumerable.Where(Animals, a => a.StartsWith("A")), a => string.Format("I want a {0}.", a)));   string[] wishList2 = Animals.Where(a… Continue reading Simplify Syntax with Extension Methods