0
How can I assign 1 to the last element of an array?
I used Last(),but there were a lot of errors
2 ответов
+ 3
To get the last item of a collection use LastOrDefault() and Last() extension methods
var lastItem = integerList.LastOrDefault();
OR
var lastItem = integerList.Last();
Remeber to add using System.Linq;, or this method won't be available.
may by using that your problem will solved
0
Thank you