Contains Method
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

IDictionary.Contains Method

When implemented by a class, determines whether the IDictionary contains an element with the specified key.

[Visual Basic]
Function Contains( _
   ByVal key As Object _
) As Boolean
[C#]
bool Contains(
   object key
);
[C++]
bool Contains(
   Object* key
);
[JScript]
function Contains(
   key : Object
) : Boolean;

Parameters

key
The key to locate in the IDictionary.

Return Value

true if the IDictionary contains an element with the key; otherwise, false.

Exceptions

Exception Type Condition
ArgumentNullException key is a null reference (Nothing in Visual Basic).

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

IDictionary Interface | IDictionary Members | System.Collections Namespace

Show:
© 2016 Microsoft