Created
April 30, 2013 07:24
-
-
Save fecub/5487136 to your computer and use it in GitHub Desktop.
Iterate a list with lambda
This file contains hidden or 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
// normal version: | |
foreach(var item in fKeySequence) | |
{ | |
Console.WriteLine("{0}", i); | |
} | |
// elegant version: | |
fKeySequence.ForEach(i => Console.WriteLine("{0}", i)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment