create the value if not already stored for that key

Namespace: VVVV.Utils.Collections
Assembly: VVVV.Utils (in VVVV.Utils.dll) Version: 1.0.4694.10871

Syntax

C#
public static TValue EnsureValue<TKey, TValue>(
	this Dictionary<TKey, TValue> dictionary,
	TKey key,
	Func<TKey, TValue> creator
)

Parameters

dictionary
Type: System.Collections.Generic..::..Dictionary<(Of <(<'TKey, TValue>)>)>

[Missing <param name="dictionary"/> documentation for "M:VVVV.Utils.Collections.DictionaryExtensions.EnsureValue``2(System.Collections.Generic.Dictionary{``0,``1},``0,System.Func{``0,``1})"]

key
Type: TKey

[Missing <param name="key"/> documentation for "M:VVVV.Utils.Collections.DictionaryExtensions.EnsureValue``2(System.Collections.Generic.Dictionary{``0,``1},``0,System.Func{``0,``1})"]

creator
Type: System..::..Func<(Of <(<'TKey, TValue>)>)>

[Missing <param name="creator"/> documentation for "M:VVVV.Utils.Collections.DictionaryExtensions.EnsureValue``2(System.Collections.Generic.Dictionary{``0,``1},``0,System.Func{``0,``1})"]

Type Parameters

TKey

[Missing <typeparam name="TKey"/> documentation for "M:VVVV.Utils.Collections.DictionaryExtensions.EnsureValue``2(System.Collections.Generic.Dictionary{``0,``1},``0,System.Func{``0,``1})"]

TValue

[Missing <typeparam name="TValue"/> documentation for "M:VVVV.Utils.Collections.DictionaryExtensions.EnsureValue``2(System.Collections.Generic.Dictionary{``0,``1},``0,System.Func{``0,``1})"]

Return Value

[Missing <returns> documentation for "M:VVVV.Utils.Collections.DictionaryExtensions.EnsureValue``2(System.Collections.Generic.Dictionary{``0,``1},``0,System.Func{``0,``1})"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Dictionary<(Of <(<'TKey, TValue>)>)>. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also