Skip to content

Instantly share code, notes, and snippets.

@alxsimo
Created April 21, 2014 09:05
Show Gist options
  • Save alxsimo/11136976 to your computer and use it in GitHub Desktop.
Save alxsimo/11136976 to your computer and use it in GitHub Desktop.
[C#] ParallelLoop - Procesado de listas en paralelo
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