From http://www.haiders.net/post/Dictionary-Lookup-avoiding-KeyNotFound-Exception.aspx
Namespace: VVVV.Utils.CollectionsAssembly: VVVV.Utils (in VVVV.Utils.dll) Version: 1.0.4694.10871
Syntax
C# |
---|
public static TValue ValueOrDefault<TKey, TValue>( this Dictionary<TKey, TValue> dictionary, TKey key ) |
Parameters
- dictionary
- Type: System.Collections.Generic..::..Dictionary<(Of <(<'TKey, TValue>)>)>
[Missing <param name="dictionary"/> documentation for "M:VVVV.Utils.Collections.DictionaryExtensions.ValueOrDefault``2(System.Collections.Generic.Dictionary{``0,``1},``0)"]
- key
- Type: TKey
The key to look up.
Type Parameters
- TKey
[Missing <typeparam name="TKey"/> documentation for "M:VVVV.Utils.Collections.DictionaryExtensions.ValueOrDefault``2(System.Collections.Generic.Dictionary{``0,``1},``0)"]
- TValue
[Missing <typeparam name="TValue"/> documentation for "M:VVVV.Utils.Collections.DictionaryExtensions.ValueOrDefault``2(System.Collections.Generic.Dictionary{``0,``1},``0)"]