C# HybridDictionary HybridDictionary(Int32, Boolean)

Description

HybridDictionary HybridDictionary(Int32, Boolean) creates a HybridDictionary with the specified initial size and case sensitivity.

Syntax

HybridDictionary.HybridDictionary(Int32, Boolean) has the following syntax.


public HybridDictionary(
  int initialSize,
  bool caseInsensitive
)

Parameters

HybridDictionary.HybridDictionary(Int32, Boolean) has the following parameters.

  • initialSize - The approximate number of entries that the HybridDictionary can initially contain.
  • caseInsensitive - A Boolean that denotes whether the HybridDictionary is case-insensitive.

Example


using System;/*from   ww  w  .j  a va2s.c  o m*/
using System.Collections;
using System.Collections.Specialized;

public class SamplesHybridDictionary  {

   public static void Main()  {
      HybridDictionary myCol = new HybridDictionary(10,false);
      myCol.Add( "F", "1.49" );
      myCol.Add( "A", "1.29" );
      myCol.Add( "B", "1.49" );

      foreach ( DictionaryEntry de in myCol )
         Console.WriteLine( "   {0,-25} {1}", de.Key, de.Value );
      Console.WriteLine();
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Collections.Specialized »




BitVector32
HybridDictionary
ListDictionary
OrderedDictionary
StringCollection
StringDictionary
StringEnumerator