HybridDictionary(Int32) constructor is used to create a case-sensitive HybridDictionary with the specified initial size.
public HybridDictionary (int initialSize);
Here, initialSize is the approximate number of entries that the HybridDictionary can initially contain.
Below given are some examples to understand the implementation in a better way:
B Banana a Air A Apple d Dolphine C Cat E Elephant F Fish D Dog
k3 v3 K3 v3 k2 v2 K2 v2 k1 v1 K1 v1
- If the initial size of the collection is greater than the optimal size for a ListDictionary, the collection is stored in a Hashtable to avoid the overhead of copying elements from the ListDictionary to the Hashtable.
- By default, the collection is case-sensitive.
- Every key in a HybridDictionary must be unique.
- This constructor is an O(n) operation, where n is initialSize.
- C# | Creating a HybridDictionary with specified initial size & case sensitivity
- C# | Creating an empty HybridDictionary with specified case sensitivity
- C# | Creating an ArrayList having specified initial capacity
- C# | Adding the specified key and value into HybridDictionary
- C# | Gets or sets the value in HybridDictionary with specified key
- C# | Removing the specified key entry from HybridDictionary
- C# | Creating an empty case-sensitive HybridDictionary Class
- C# | Check if HybridDictionary has fixed size
- C# | Check the HybridDictionary for a specific key
- C# | HybridDictionary Class
- C# | Check if HybridDictionary is Synchronized (thread safe)
- C# | Check if HybridDictionary is read only
- C# | Count the number of key/value pairs in HybridDictionary
- C# | Removing all entries from HybridDictionary
- C# | Copying the HybridDictionary entries to an Array Instance
- C# | Get an ICollection containing the keys in HybridDictionary
- C# | Get an enumerator that iterates through the HybridDictionary
- C# | Get an ICollection containing the values in HybridDictionary
- C# | Check if two HybridDictionary objects are equal
- How to get Synchronize access to the HybridDictionary in C#
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : nidhi_biet