CollectionExtensions.Get<TKey,TValue> method (1 of 2)

namespace: Serenity   assemblySerenity.Net.Core

Gets the specified key or returns default value of TValue if not found.

public static TValue Get<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key)
parameter description
TKey The type of the key.
TValue The type of the value.
dict The dictionary.
key The key.

Return Value

Value for specified key, or default value if not found.

See Also


CollectionExtensions.Get<TKey,TValue> method (2 of 2)

namespace: Serenity   assemblySerenity.Net.Core

Gets the specified key or returns defaultValue if not found.

public static TValue Get<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key, 
    TValue defaultValue)
parameter description
TKey The type of the key.
TValue The type of the value.
dict The dictionary.
key The key.
defaultValue The default value.

Return Value

Value for specified key, or default value if not found.

See Also