Calculating prime numbers with LINQ in C#(leniel.net)
submitted by
leniel(504) 2 years, 11 months ago
It is a beautiful proof of the power and expressiveness of LINQ. The query expression states that from each value i in the Enumerable.Range(2, max - 1) where all elements of the range Enumerable.Range(2, i – 2) satisfy the condition All(j => i % j != 0), we select i.
|category: Linq
|Views: 66
tags:
LINQ Number prime Programming C# another
Everyones tags:
Your Tags: