58
1
using System;
2
using System.IO;
3
using System.Collections;
4
using System.Collections.Generic;
5
using System.Linq;
6
using System.Threading;
7
using System.Threading.Tasks;
8
9
10
11
public class Program
12
{
13
public static void Main()
14
{
15
//SimpleParallelFor();
16
ParallelForWithThreadLocalVariables();
17
}
18
19
private static void SimpleParallelFor()
20
{
21
ParallelLoopResult result = Parallel.For(0, 100, index => CalculateSum(index));
22
Console.WriteLine(result.IsCompleted);
23
}
24
Cached Result
directory not found exception handled
Tasks Exception: ArgumentNullException Value cannot be null. (Parameter 'path')
Tasks Exception: ArgumentNullException Value cannot be null. (Parameter 'path')