Click or drag to resize
DictionarySerializationContextTryDeserializeT Method (DictionaryString, Object, String, T)
Tries to deserialize the value with the specified key in the specified data dictionary. If the key is not found, the specified default value is returned.

Namespace: Slash.Serialization.Dictionary
Assembly: Slash.Serialization (in Slash.Serialization.dll) Version: 1.0.6018.40176
Syntax
public T TryDeserialize<T>(
	Dictionary<string, Object> data,
	string key,
	T defaultValue
)

Parameters

data
Type: System.Collections.GenericDictionaryString, Object
Data dictionary which contains value.
key
Type: SystemString
Key of value in data dictionary.
defaultValue
Type: T
Default value to use if key was not found.

Type Parameters

T
Type of value to deserialize.

Return Value

Type: T
Deserialized value if found; otherwise, specified default value.
See Also