IamCalvinBrown.com a Blog Site

Code Examples, Consulting Advice and lots of other cool things

How to query using linq to objects in .net

Want to query a collection without writing a loop in .NET? Here's a linq expression, and the sample code to help.

// our custom object of data

int[] listOfNumbers = { 12345678910 };

 // use LINQ to get all even numbers

    var result = from number in listOfNumbers
        where (number % 2) == 0
         select number;

To download the sample project, please visit http://bit.ly/2vGZriL

Comments (2) -

  • TypKPTA0b7JE

    11/21/2017 4:37:38 PM |

    842341 693785I require to admit that that is one fantastic insight. It surely gives a company the opportunity to have in around the ground floor and truly take part in generating a thing special and tailored to their needs. 179784

  • sasi

    12/26/2018 5:56:26 AM |

    I partially agree and partially don’t agree with the list at the same time.
    While there is a lot of importance and tools that are UI,Functional automation tools,
    there is not enough mention of non-functional tools like Jmeter,
    which is a fantastic tool and is one of the most popular ones in the market.

    <a href="www.besanttechnologies.com/.../selenium-training-institute-in-chennai";>selenium training in chennai</a>