Method TryGetValue
TryGetValue<TResult>(string, out TResult?)
Gets the value associated with the specified key and casts it into TResult
.
public bool TryGetValue<TResult>(string key, out TResult? value)
Parameters
key
stringThe key whose to get.
value
TResultWhen this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Returns
- bool
true if the object is find with the specified key; otherwise, false.
Type Parameters
TResult
The type which will be casted into.