Table of Contents

Class DictionaryExtensions

Namespace
Squiggles.Core.Extension
Assembly
SquigglesCommon4X.dll

SC4X System.Collections.Generic.Dictionary extensions

public static class DictionaryExtensions
Inheritance
DictionaryExtensions
Inherited Members

Methods

AddSafe<T, TY>(Dictionary<T, TY>, T, TY)

Safely adds a value to a dictionary.

public static void AddSafe<T, TY>(this Dictionary<T, TY> dictionary, T key, TY value) where T : notnull

Parameters

dictionary Dictionary<T, TY>

the dictionary in question

key T

the key to insert at

value TY

the value to insert

Type Parameters

T

type of the dictionary's keys

TY

type of the dictionary's values

ContainsKeys<T, TY>(Dictionary<T, TY>, params T[])

Determines whether a large number of keys are present in a given dictionary.

public static bool ContainsKeys<T, TY>(this Dictionary<T, TY> dictionary, params T[] keys) where T : notnull

Parameters

dictionary Dictionary<T, TY>
keys T[]

an array of keys of the type from the specified dictionary.

Returns

bool

Type Parameters

T
TY