In an example in Beginning
VB.Net about the use of collections I am mystified about one aspect. The example is fairly close to the following:
dim customer as CustomerStruct ' multiple members
dim CustHash as new Hashtable
...populate customer
me.list.add(customer) ' A collection was allocated previous
CustHash.add(key, customer)
My questions concern the last 2 statements. Is the addition of customer to me.list in memory separate from the memory allocated to customer in the hashtable? If so, why would I want to do this? Can't I always retrieve customer from the hashtable?
I think the example is probably not trying to illustrate the best way to do something but rather is trying to provide a more complete exposition on the use of collections.
I would appreciate any feedback, particularly if I am missing something.
Best regards,
Greg
email:
[email protected]