C# HybridDictionary Values

Description

HybridDictionary Values gets an ICollection containing the values in the HybridDictionary.

Syntax

HybridDictionary.Values has the following syntax.


public ICollection Values { get; }

Example


using System;//ww  w  .j a v a 2  s .co 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" );

      String[] myKeys = new String[myCol.Count];
      myCol.Keys.CopyTo( myKeys, 0 );

      Console.WriteLine( "   INDEX KEY                       VALUE" );
      for ( int i = 0; i < myCol.Count; i++ )
         Console.WriteLine( "   {0,-5} {1,-25} {2}", i, myKeys[i], myCol[myKeys[i]] );
      Console.WriteLine();
   }

}

The code above generates the following result.





















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




BitVector32
HybridDictionary
ListDictionary
OrderedDictionary
StringCollection
StringDictionary
StringEnumerator