C# HybridDictionary Clear

Description

HybridDictionary Clear removes all entries from the HybridDictionary.

Syntax

HybridDictionary.Clear has the following syntax.


public void Clear()

Returns

HybridDictionary.Clear method returns

Example

Removes all entries from the HybridDictionary.


using System;// w  w w.ja v  a 2s . c  o  m
using System.Collections;
using System.Collections.Specialized;

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

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

}




















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




BitVector32
HybridDictionary
ListDictionary
OrderedDictionary
StringCollection
StringDictionary
StringEnumerator