Hi friends........
I am trying to store an object using a key in a Hashtable. And some other object already exists in that location, then what will happen? The existing object will be overwritten? Or the new object will be stored elsewhere?
Thanks..........
Loading


VulpesRank #55 · 29.2K reputationPosted Dec 20, 2011, 6:48 AM EST
So, if you try to 'put' a key/value pair to the Hashtable and the key already exists, then the existing value for that key will be overwritten with the new value.
Satyapriya NayakRank #47 · 31.5K reputationPosted Dec 20, 2011, 7:48 AM EST
Agreed with @vulpes.
The existing object will be overwritten and thus it will be lost.
Thanks
Sam HobbsRank #107 · 20.5K reputationPosted Dec 20, 2011, 10:44 AM EST
Vikas MishraRank #559 · 4.3K reputationPosted Dec 20, 2011, 1:00 PM EST