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();
var lastItem = integerList.Last();
var lastItem = someList{^1];
Seq.last lst