string[] items = GetAllItems(); string lastItem = items[items.Length - 1]; int arrayLength = array.Length;