src/NetStandard/Collections/Collections/src/Specialized/OrderedDictionary.cs
/// <summary>
/// Sets the value associated with the specified key.
/// </summary>
/// <param name="key">The key associated with the value to set.</param>
/// <param name="value">The the value to set.</param>
Sets the value associated with the specified key.
Sets the value associated with the specified key .
public void SetValue(K key, [AllowNull] V value)
        {
            var kvp = new KeyValuePair<K, V>(key, value!);
            var idx = IndexOf(key);
            if (idx > -1) {
                keyedCollection[idx] = kvp;
            } else {
                keyedCollection.Add(kvp);
            }
        }
public void SetValue ( K key , [ AllowNull ] V value ) { var kvp = new KeyValuePair < K , V > ( key , value ! ) ; var idx = IndexOf ( key ) ; if ( idx > - 1 ) { keyedCollection [ idx ] = kvp ; } else { keyedCollection . Add ( kvp ) ; } }
Sets the value associated with the specified key.
Sets the value associated with the specified key .
key
K
The key associated with the value to set.
The key associated with the value to set .
V
[AllowNull]
value
The the value to set.
The the value to set .