When we compared with Dictionary object, the hashtable will provide lower performance because the hashtable elements are of object type so the boxing and unboxing process will occur when we store or retrieve values from the hashtable. In visual basic, hashtable is same as Dictionary object but the only difference is the Dictionary object is useful to store a key-value pair of same data type elements. Here, the bucket is a virtual subgroup of elements within the hashtable and each bucket is associated with a hash code, which is generated based on the key of the element. Generally, the hashtable object will contain buckets to store elements of the collection. ![]() ![]() In visual basic, Hashtable is useful to store a collection of key/value pairs of different data types and those are organized based on the hash code of the key.
0 Comments
Leave a Reply. |