Search Results for

    Show / Hide Table of Contents

    Class DictionaryExtensions

    Dictionary extensions

    Inheritance
    System.Object
    DictionaryExtensions
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: ImageVault.Common.Lib.Collections
    Assembly: ImageVault.Common.dll
    Syntax
    public static class DictionaryExtensions

    Methods

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

    Declaration
    public static TValue Get<TKey, TValue>(this IDictionary<TKey, TValue> dic, TKey key, TValue defaultValue = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue> dic
    TKey key
    TValue defaultValue
    Returns
    Type Description
    TValue
    Type Parameters
    Name Description
    TKey
    TValue

    GetInt<TKey, TValue>(IDictionary<TKey, TValue>, TKey, Int32)

    Declaration
    public static int GetInt<TKey, TValue>(this IDictionary<TKey, TValue> dic, TKey key, int defaultValue = 0)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue> dic
    TKey key
    System.Int32 defaultValue
    Returns
    Type Description
    System.Int32
    Type Parameters
    Name Description
    TKey
    TValue

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

    Declaration
    public static void Set<TKey, TValue>(this IDictionary<TKey, TValue> dic, TKey key, TValue value)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue> dic
    TKey key
    TValue value
    Type Parameters
    Name Description
    TKey
    TValue

    ToQuery(IDictionary<String, String>)

    Converts the dictionary to a key=value string where each key/value are url encoded and concatenated with a & char

    Declaration
    public static string ToQuery(this IDictionary<string, string> dic)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, System.String> dic
    Returns
    Type Description
    System.String
    In This Article
    Back to top (c) Meriworks 2002-2022