C# StringDictionary Count

Description

StringDictionary Count gets the number of key/value pairs in the StringDictionary.

Syntax

StringDictionary.Count has the following syntax.


public virtual int Count { get; }

Example


using System;//  w  w  w  .  j a  v  a  2 s.co  m
using System.Collections;
using System.Collections.Specialized;

public class SamplesStringDictionary  {

   public static void Main()  {
      StringDictionary myCol = new StringDictionary();
      myCol.Add( "red", "rojo" );
      myCol.Add( "green", "verde" );
      myCol.Add( "blue", "azul" );

      Console.WriteLine( myCol.Count );
   }
}

The code above generates the following result.





















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




BitVector32
HybridDictionary
ListDictionary
OrderedDictionary
StringCollection
StringDictionary
StringEnumerator