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[0]; //first element
var last = _ids[_ids.Count - 1]; //last element
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #item #list
ADD COMMENT
Topic
Name
6+9 =