List GetRange error in C#

前端 未结 3 1248
再見小時候
再見小時候 2021-01-19 04:56

i am working with list and my list has 14 record.

 List oProduct = new List 
        {
           new Product(\"../images/1.jpg         


        
3条回答
  •  伪装坚强ぢ
    2021-01-19 05:27

    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.

提交回复
热议问题