Answers for "c# access last 2 elements in array"

C#
9

get last element of array c#

string[] str = new string[] {"Java","HTML","jQuery"};
Console.WriteLine("Last element: "+str[str.Length - 1])
Posted by: Guest on June-21-2020
0

c# array last element

int[] array = { 1, 3, 5 };
var lastItem = array[^1]; // 5
Posted by: Guest on March-15-2022

Code answers related to "c# access last 2 elements in array"

C# Answers by Framework

Browse Popular Code Answers by Language