I have an application that will continuously taking user's input and store the input in a List
of class ItemsValue
How am I going to make it so that once the collection reaches 1000 counts, it will "stop" and a new collection will be created and so on.
For example:
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.