language: C# (mono-2.8)
date: 593 days 16 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Linq;
using System.Threading.Tasks;
 
public class Program
{
        public static void Main(string[] args)
        {
                for (int i=0; i<20; i++)
                        System.Console.WriteLine(fibonacci(i));
        }
 
        private static ulong fibonacci(int n)
        {
            ulong u = 0;
            ulong v = 1;
            ulong t;
#if true
            Parallel.For(2, n + 1, i =>
#else
                Enumerable.Range(2, n+1).ToList().ForEach(i =>
#endif
            {
                t = u + v;
                u = v;
                v = t;
            });
            return v;
        }
}
 
prog.cs(2,24): error CS0234: The type or namespace name `Tasks' does not exist in the namespace `System.Threading'. Are you missing an assembly reference?
Compilation failed: 1 error(s), 0 warnings