CommonExtensionMethods.GetValueOrDefault Method

Definition

Gets the value of the specified key, if present

public static string GetValueOrDefault (this System.Collections.Generic.IDictionary<string,string> map, string keyName);
static member GetValueOrDefault : System.Collections.Generic.IDictionary<string, string> * string -> string
<Extension()>
Public Function GetValueOrDefault (map As IDictionary(Of String, String), keyName As String) As String

Parameters

map
IDictionary<String,String>

The dictionary containing the specified key

keyName
String

The key of the desired value

Returns

The value, if present

Applies to