HybridDictionary(Int32, Boolean) creates a HybridDictionary with the specified initial size and case sensitivity.
public HybridDictionary (int initialSize, bool caseInsensitive);
- initialSize : The approximate number of entries that the HybridDictionary can initially contain.
- caseInsensitive : A Boolean that denotes whether the HybridDictionary is case-insensitive.
Below programs illustrate the use of HybridDictionary(Int32, Boolean):
III third V fifth II second i first I first IV fourth
System.ArgumentException: Item has already been added. Key in dictionary: ‘A’ Key being added: ‘a’
- 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.
- This constructor is an O(n) operation, where n is initialSize.
- C# | Creating a Case-Sensitive HybridDictionary with specified initial size
- C# | Creating an empty HybridDictionary with specified case sensitivity
- C# | Creating an empty case-sensitive HybridDictionary Class
- C# | Creating an ArrayList having specified initial capacity
- C# | Check if HybridDictionary has fixed size
- C# | HybridDictionary Class
- C# | Adding the specified key and value into HybridDictionary
- C# | Gets or sets the value in HybridDictionary with specified key
- C# | Get an ICollection containing the values in HybridDictionary
- C# | Removing the specified key entry from HybridDictionary
- C# | Check the HybridDictionary for a specific key
- C# | Get an enumerator that iterates through the HybridDictionary
- C# | Removing all entries from HybridDictionary
- C# | Get an ICollection containing the keys in HybridDictionary
- C# | Check if HybridDictionary is read only
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.