how to get the last element in an array in c#
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]);
}
}
Also in C#:
- setting the parent of a transform which resides in a prefab
- c# declare an int list
- how to redirect to extern page in .net core
- unity inspector header attribute
- c# null conditional
- how to insert into a list c#
- null coalesce ternary c#
- convert generic to type c#
- c# xml file builder
- how to create a list c#
- for each property in object c#
- c# repeat string x times
- unity left mouse button
- c# shorten an definition
- c sharp index of substring
- unity face direction of movement
- c# download string url
- get attribute value of xml element c#
- conditional compilation c#
- unity fall damage c#
- strtorime online
- c# unhandled exception in thread
- C# extend array
- check which activity in focus in android