Javatpoint Logo
Javatpoint Logo

LINQ ElementAt() Method

In LINQ, ElementAt() operator is used to return the elements from the list/collection based on the specified index.

Generally, in the list, the index will start with zero, so if we want to get the first element, then there is a need to send zero (0) as an index position.

Syntax of LINQ ElementAt() Method

In the above syntax, we are getting the element at second index position element from the collection.

Example of LINQ ElementAt() Method

Here is the example of using the LINQ ElementAt() method to get the elements at specified index position.

From the above example, we are trying to get the different elements in the collection based on the different index positions.


LINQ ElementAt() Method

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA