Tag Archives: lambda expression

Use LINQ with an embedded lambda expression to find prime numbers in C# (Part 3 of 3)

The example Use more efficient LINQ to find prime numbers in C# (Part 2 of 3) uses a LINQ query to find prime numbers. It creates a delegate variable named IsOddPrime referring to a lambda expression and uses it to … Continue reading

Posted in algorithms, LINQ, mathematics | Tagged , , , , , , , , , , | 4 Comments

Use more efficient LINQ to find prime numbers in C# (Part 2 of 3)

The previous post showed how you can use LINQ to find prime numbers. For every number between 1 and a maximum, the LINQ query called the IsPrime method to see if the number should be part of the selection. That … Continue reading

Posted in algorithms, LINQ, mathematics | Tagged , , , , , , , , , , | 1 Comment