Last active
August 29, 2015 14:23
-
-
Save fffej/791cf604e8feada28439 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var foos = new List<int>{1,2,3,4}; | |
var bars = new List<int>(); | |
foreach(var foo in foos) { | |
Console.WriteLine("hello"); | |
bars.Add(x*2); | |
} | |
// versus. | |
var bars = foos.Select(x => {Console.WriteLine("hello"); return x*2;}); | |
Console.WriteLine("goodbye"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment