DictionaryExtensionGetOrCreateTKey, TValue Method

Definition

Namespace: Recrovit.RecroGridFramework.Abstraction.Extensions
Assembly: Recrovit.RecroGridFramework.Abstraction (in Recrovit.RecroGridFramework.Abstraction.dll) Version: 1.3.0.10221
C#
public static TValue GetOrCreate<TKey, TValue>(
	this IDictionary<TKey, TValue> self,
	TKey key,
	Func<TValue> factory
)

Parameters

self  IDictionaryTKey, TValue
 
key  TKey
 
factory  FuncTValue
 

Type Parameters

TKey
TValue

Return Value

TValue

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDictionaryTKey, TValue. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also