last elemeent of array c# code example
Example 1: get last element of array c#
string[] str = new string[] {"Java","HTML","jQuery"};
Console.WriteLine("Last element: "+str[str.Length - 1])
Example 2: c# get last array element
string[] items = GetAllItems();
string lastItem = items[items.Length - 1];
int arrayLength = array.Length;