Horje
c# get last item in list Code Example
c# get last item in list
using System.Linq; // make sure to use System.Linq

List<string> list = new List<string>
{
	"one",
	"two",
	"three",
};
var lastItem = list.LastOrDefault();
//Or
var lastItem = list.Last();
c# get the last item in a list
var lastItem = integerList.Last();
get last element in a list vb.net
if(integerList.Count>0)
{
   var item = integerList[integerList.Count - 1];
}




Csharp

Related
string formatting of spacing with c# Code Example string formatting of spacing with c# Code Example
casting string to enum type Code Example casting string to enum type Code Example
how to find a gameobject in unity Code Example how to find a gameobject in unity Code Example
difference between executescalar and executenonquery and executereader Code Example difference between executescalar and executenonquery and executereader Code Example
c# override index operator Code Example c# override index operator Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10