Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Determines whether the IDictionary object contains an element with the specified key.
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Function Contains ( _
key As Object _
) As Boolean
bool Contains(
Object key
)
bool Contains(
Object^ key
)
abstract Contains :
key:Object -> bool
function Contains(
key : Object
) : boolean
Parameters
- key
Type: System. . :: . .Object
The key to locate in the IDictionary object.
Return Value
Type: System. . :: . .Boolean
true if the IDictionary contains an element with the key; otherwise, false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | key is null Nothing nullptr unit a null reference (Nothing in Visual Basic) . |
Remarks
Implementations can vary in whether they allow the key to be null Nothing nullptr unit a null reference (Nothing in Visual Basic) .
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.