Determines whether the NameValueCollection
contains the specified String key.
Namespace: CodeSmith.CustomPropertiesAssembly: CodeSmith.CustomProperties (in CodeSmith.CustomProperties.dll) Version: 6.0.0.0 (7.0.0.15127)
Syntax
| C# |
|---|
public bool ContainsKey( string key ) |
| Visual Basic |
|---|
Public Function ContainsKey ( key As String ) As Boolean |
Parameters
- key
- Type: System..::..String
The String key to locate in the NameValueCollection.
Return Value
Type: Booleantrue if the NameValueCollection contains an element with the specified key; otherwise, false.
Remarks
Please refer to ContainsKey(Object) for details but note
that the NameValueCollection requires linear time to locate a key.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | key is a null reference. |