Created
April 21, 2014 09:05
-
-
Save alxsimo/11136976 to your computer and use it in GitHub Desktop.
[C#] ParallelLoop - Procesado de listas en paralelo
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
class Program { | |
static void Main(string[]args) | |
{ | |
ParallelLoop(); | |
Console.ReadLine(); | |
} | |
public static void ParallelLoop() | |
{ | |
var colors = new List{"red", "white", "blue", "green", "yellow","black"}; | |
System.Threading.Tasks.Parallel.ForEach(colors, clr => Console.WriteLine(clr)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment