C# HybridDictionary Contains

Description

HybridDictionary Contains determines whether the HybridDictionary contains a specific key.

Syntax

HybridDictionary.Contains has the following syntax.


public bool Contains(
  Object key
)

Parameters

HybridDictionary.Contains has the following parameters.

  • key - The key to locate in the HybridDictionary.

Returns

HybridDictionary.Contains method returns true if the HybridDictionary contains an entry with the specified key; otherwise, false.

Example


using System;/*w ww. ja  v a2s . 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" );
      Console.WriteLine(myCol.Contains("A"));
   }

}

The code above generates the following result.





















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




BitVector32
HybridDictionary
ListDictionary
OrderedDictionary
StringCollection
StringDictionary
StringEnumerator