public bool TryAdd(
string key,
Object? value
)Public Function TryAdd (
key As String,
value As Object
) As Booleanpublic:
virtual bool TryAdd(
String^ key,
Object^ value
) sealedabstract TryAdd :
key : string *
value : Object -> bool
override TryAdd :
key : string *
value : Object -> bool Unlike the Add method, this method doesn't throw an exception if the element with the given key exists in the CommandState. Unlike the indexer, TryAdd doesn't override the element if the element with the given key exists in the dictionary. If the key already exists, TryAdd does nothing and returns .
| ArgumentNullException | key is . |