我会不断记录用户输入的应用程序和输入存储在class ItemsValue
创建集动态在C#
一个List
我怎么让它这样一旦集合达到1000次,它会“停止“,并创建一个新的集合,等等。
例如:
List<ItemsValue> collection1 = new List<ItemsValue>();
//User input will be stored in `collection1`
if (collection1.count >= 1000)
//Create a new List<ItemsVales> collection2,
//and the user input will be stored in collection2 now.
//And then if collection2.count reaches 1000, it will create collection3.
//collection3.count reaches 1000, create collection4 and so on.
您可以制作收藏列表。但最初的目的是什么? –
为什么?为什么不只是添加到相同的集合? – Euphoric
[XY问题?](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) – Liam