Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

parallelism in c#

using System;
using System.Threading.Tasks;

public class Example {
   public static void Main() {
      Task tsk = Task.Run(() => {
         int a = 0;
         for (a = 0; a <= 1000; a++) {}
         Console.WriteLine("{0} loop iterations ends", a);
      });
      tsk.Wait();
   }
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #parallelism
ADD COMMENT
Topic
Name
2+2 =