var lastItem = integerList.Last();
string[] str = new string[] {"Java","HTML","jQuery"}; Console.WriteLine("Last element: "+str[str.Length - 1])
using System; public class Demo { public static void Main() { string[] str = new string[] { "Java", "HTML", "jQuery", "JavaScript", "Bootstrap" }; Console.WriteLine("Array..."); foreach(string res in str) { Console.WriteLine(res); } Console.WriteLine("Last element: "+str[str.Length - 1]); } }
int[] somearray = new int[4] {0, 1, 34, 2} int lastelement = somearray[somearray - 1];
Seq.last lst