i am working with list and my list has 14 record.
List oProduct = new List
{
new Product(\"../images/1.jpg
The second parameter to GetRange needs to be the count of elements to get, so change it to 4
(I think that's what you want).
Also, the first parameter is the zero-based index, so you want GetRange(9, 4)
to get images 10 through 13.
List<T>.GetRange
takes start
and count
, not start
and end
. If you want elements 10-13, use GetRange(10, 4)
.
You are asking for 13 elements, starting from element ten.