Linq Example 27 - Element At

11:29 PM
Linq Query:

//Element At
            int[] intNums = { 1, 2, 3, 4 };

            var myNums = intNums.ElementAt(2); //means strating from 0 then 1 and then 2.

            Console.WriteLine(myNums);

//

Output:

3

0 comments:

Post a Comment