Is it possible to have a list of collections? Suppose I create a collection that has 3 key/value pairs to represent an item that has a part number, a description & a price. Now I want to create a list of many of these collections to represent a bunch of parts that I can then pass to a function & loop through them. I tried something like this:
I can add one collection to the list, but I dont know how to add more. I'm probably going about this all wrong ... can anyone suggest a better way to do what I'm trying to do? Thanks...
Code:
Dim itemList As New List(Of Collection)
Dim itemColl As New Collection
itemColl.Add("12345", "partnum")
itemColl.Add("Item1", "desc")
itemColl.Add("5.00", "price")
itemList.Add(itemColl)