static void Main()
    {
        // The sum of these elements is 40.
        int[] input = { 4, 1, 6, 2, 9, 5, 10, 3 };
        int sum = 0;

        try
        {
            Parallel.ForEach(
                    input,                                                // source collection
                    () => 0,                                                // thread local initializer
                    (n, loopState, localSum) =>                // body
                    {
                        localSum += n;
                        Console.WriteLine("Thread={0}, n={1}, localSum={2}", Thread.CurrentThread.ManagedThreadId, n, localSum);
                        return localSum;
                    },
                    (localSum) => Interlocked.Add(ref sum, localSum)                                        // thread local aggregator
                );

            Console.WriteLine("nSum={0}", sum);
        }
        // No exception is expected in this example, but if one is still thrown from a task,
        // it will be wrapped in AggregateException and propagated to the main thread.
        catch (AggregateException e)
        {
            Console.WriteLine("Parallel.ForEach has thrown an exception. THIS WAS NOT EXPECTED.n{0}", e);
        }
    }




같은 코드량으로 c나 자바같은 상대적인 저급 언어보다 할 수 있는 일이 방대할 뿐이지 C#자체를 만만히 보면 안되지
 (예를들면 자바에서 데이터를 넣는게 100줄이라면 C#은 넣고 뿌리는게 100줄이면 된다)
저수준에서 구현하는 알고리즘(시멘트 제조)은 다 구현해놓았으니 개발자는 그런거 신경쓰지 말고 건물 설계와 건축만 하라는게 닷넷의 가치관이지

근데 C#은 일거리가 없음.. 배우진 마라...