Show / Hide Table of Contents

    Class IDictionaryExtensions

    Represents the dictionary extensions.

    Inheritance
    Object
    IDictionaryExtensions
    Namespace: Platform.Collections
    Assembly: Platform.Collections.dll
    Syntax
    public static class IDictionaryExtensions : object

    Methods

    | Improve this Doc View Source

    GetOrAdd<TKey, TValue>(IDictionary<TKey, TValue>, TKey, Func<TKey, TValue>)

    Gets the or add using the specified dictionary.

    Declaration
    public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TValue> valueFactory)
    Parameters
    Type Name Description
    IDictionary<TKey, TValue> dictionary

    The dictionary.

    TKey key

    The key.

    Func<TKey, TValue> valueFactory

    The value factory.

    Returns
    Type Description
    TValue

    The value.

    Type Parameters
    Name Description
    TKey

    The key.

    TValue

    The value.

    | Improve this Doc View Source

    GetOrDefault<TKey, TValue>(IDictionary<TKey, TValue>, TKey)

    Gets the or default using the specified dictionary.

    Declaration
    public static TValue GetOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
    Parameters
    Type Name Description
    IDictionary<TKey, TValue> dictionary

    The dictionary.

    TKey key

    The key.

    Returns
    Type Description
    TValue

    The value.

    Type Parameters
    Name Description
    TKey

    The key.

    TValue

    The value.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX