Enumerate through a subset of a Collection in C#?

后端 未结 6 1500
粉色の甜心
粉色の甜心 2021-02-08 01:12

Is there a good way to enumerate through only a subset of a Collection in C#? That is, I have a collection of a large number of objects (say, 1000), but I\'d like to enumerate

6条回答
  •  眼角桃花
    2021-02-08 01:34

    You might be able to do something with Linq. The way I would do this is to put the objects into an array, then I can choose which items I want to process based on the array id.

提交回复
热议问题