Answers for "linq query to get last item in list c#"

C#
11

c# get the last item in a list

var lastItem = integerList.Last();
Posted by: Guest on March-24-2020
0

Using Linq to get the last N elements of a collection? C#

List<string> mystring = new List<string>() { "one", "two", "three" }; 
mystring = Enumerable.Reverse(mystring).Take(2).Reverse().ToList();
Posted by: Guest on September-29-2021

C# Answers by Framework

Browse Popular Code Answers by Language