Nu/Nu.Math/OrderedDictionary.cs
/// <summary>
/// Tries to get the value associated with the given key. If the key is not found,
/// default(TValue) value is stored in the value.
/// </summary>
/// <param name="key">The key to get the value for.</param>
/// <param name="value">The value used to hold the results.</param>
/// <returns>True if the key was found; otherwise, false.</returns>
/// <exception cref="System.ArgumentNullException">The key is null.</exception>
Tries to get the value associated with the given key. If the key is not found,
default(TValue) value is stored in the value.
Tries to get the value associated with the given key . If the key is not found default ( TValue ) value is stored in the value .
public bool TryGetValue(TKey key, out TValue value)
        {
            if (dictionary.TryGetValue(key, out int index))
            {
                value = values[index];
                return true;
            }
            value = default;
            return false;
        }
public bool TryGetValue ( TKey key , out TValue value ) { if ( dictionary . TryGetValue ( key , out int index ) ) { value = values [ index ] ; return true ; } value = default ; return false ; }
Tries to get the value associated with the given key.
Tries to get the value associated with the given key .
True if the key was found; otherwise, false.
True if the key was found ; otherwise false .
The key is null.
The key is null .
key
TKey
The key to get the value for.
The key to get the value for .
TValue
out
value
The value used to hold the results.
The value used to hold the results .