NDepend.API Documentation
TryAdd<TKey,TValue> Method (ExtensionMethodsEnumerable)
NDepend.Helpers Namespace > ExtensionMethodsEnumerable Class : TryAdd<TKey,TValue> Method
This dictionary.
The key.
The value.
Add a pair of key and value to dico, only if dico doesn't already contain the key.
Syntax

Parameters

dico
This dictionary.
key
The key.
value
The value.

Type Parameters

TKey
TValue

Return Value

false if the dico already contains the key. Else add the pair key and value and returns true.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsEnumerable Class
ExtensionMethodsEnumerable Members