get first and last item list c#
List<string> _ids = new List<string>() { "aaa", "bbb", "ccc", "ddd" };
var first = _ids[0]; //first element
var last = _ids[_ids.Count - 1]; //last elementList<string> _ids = new List<string>() { "aaa", "bbb", "ccc", "ddd" };
var first = _ids.First();
var last = _ids.Last();
Console.WriteLine(first);
Console.WriteLine(last);
Also in C#:
- c# else if
- json tiers dot in name c#
- sum the digits in c#
- if statement conditions c#
- c# reflection create generic type
- c# Authorization has been denied for this request
- postasync c# returns null
- declare string array c# without size
- unity draw wire square
- return a list of list from yaml via C#
- C# function return datareader
- asp.net tag helper checkbox
- how to detect if a key is pressed in c#
- iphone
- how consider the first caracter in Split c#
- http post request login example asp.net c#
- textblock line break
- unity connect to firebase
- unity try get component
- what type of variable is true or false in c#
- exit game unity
- Movement 2d unity
- unity deactivate scripts in list
- c# arraylist to listview