 | 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.DictionaryAssembly: Slash.Serialization (in Slash.Serialization.dll) Version: 1.0.6018.40176
Syntaxpublic T TryDeserialize<T>(
Dictionary<string, Object> data,
string key,
T defaultValue
)
Public Function TryDeserialize(Of T) (
data As Dictionary(Of String, Object),
key As String,
defaultValue As T
) As T
public:
generic<typename T>
T TryDeserialize(
Dictionary<String^, Object^>^ data,
String^ key,
T defaultValue
)
member TryDeserialize :
data : Dictionary<string, Object> *
key : string *
defaultValue : 'T -> 'T
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:
TDeserialized value if found; otherwise, specified default value.
See Also