K
Type of keys in dictionary.
V
Type of values in dictionary.
Platform Core .NET Assemblies API
GetValueOrDefault<K,V> Method
See Also  Send Feedback
Terrasoft.Common Namespace > DictionaryUtilities Class : GetValueOrDefault<K,V> Method
source
Source dictionary.
key
Key which value to get.
defValue
Default value.

Glossary Item Box

Gets value from dictionary. If no value found then returns defValue.

Syntax

 
C#
 
 

Parameters

source
Source dictionary.
key
Key which value to get.
defValue
Default value.

Type Parameters

K
Type of keys in dictionary.
V
Type of values in dictionary.

Return Value

Value from dictionary or default value.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© Terrasoft 2002-2018.