C# Implementation of Problem 10

View source code here on GitHub!

class p0010
: Euler.IEuler
object Answer ()
 1/*
 2Project Euler Problem 10
 3
 4Problem:
 5
 6The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
 7
 8Find the sum of all the primes below two million.
 9*/
10using System;
11
12namespace Euler
13{
14    public class p0010 : IEuler
15    {
16        public object Answer()
17        {
18            return Prime.Primes<long>(2000000).Sum();
19        }
20    }
21}

Tags: prime-number, csharp-iterator