Archive

Posts Tagged ‘LINQ’

>PLINQ – Pallalel Computing Made Easy

September 9, 2010 Leave a comment

>static void Main(string[] args)

{
List<string> myCollection = new List<string>
{
“Item1”,
“Item2”,
“Item3”,
“Item4”,
“Item5”,
};


myCollection
.AsParallel()
.ForAll(item =>
{
string newItemName = string.Format(“Formatted Item:{0}_{1}”, item, System.Guid.NewGuid());
Console.WriteLine(newItemName);
}
);

Not really an intensive processing right, but atleast you get the idea.

}

Advertisements
Categories: .NET Development Tags: , ,
%d bloggers like this: