Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

get first and last item list c#

List<string> _ids = new List<string>() { "aaa", "bbb", "ccc", "ddd" };
var first = _ids.First();
var last = _ids.Last();
Console.WriteLine(first);
Console.WriteLine(last);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #item #list
ADD COMMENT
Topic
Name
9+9 =