Ejemplo n.º 1
0
    /// <summary>
    /// Adds and updates the keys/value based on <paramref name="propertiesToSet"/>.
    /// Any other keys are uneffected.
    /// </summary>
    /// <param name="h"></param>
    /// <param name="propertiesToSet"></param>
    public static void SetHashtable(this Hashtable h, Hashtable propertiesToSet)
    {
        var customProps = propertiesToSet.StripToStringKeys() as Hashtable;

        h.Merge(customProps);
        h.StripKeysWithNullValues();
    }