More Related Content
More from Takaaki Suzuki (20)
TPL入門
- 14. 1.
2.
3.
using System;
using System.Linq;
using System.Threading.Tasks;
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
namespace ConsoleApplication
{
class Program
{
static void Main()
{
int lower = 0;
int upper = 10000;
var source = Enumerable.Range(lower, upper).ToArray();
Parallel.For(lower, upper, index =>
{
//----- Do Something
Console.WriteLine(source[index]);
});
}
}
}