Answers for "c# get last 3 elements of list"

C#
1

c# get last item in list

using System.Linq; // make sure to use System.Linq

List<string> list = new List<string>
{
	"one",
	"two",
	"three",
};
var lastItem = list.LastOrDefault();
//Or
var lastItem = list.Last();
Posted by: Guest on November-16-2021
11

c# get the last item in a list

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

Code answers related to "c# get last 3 elements of list"

C# Answers by Framework

Browse Popular Code Answers by Language