Skip to content

Properties.TryGet Method ​

Definition ​

Tries to get the value of a single valued property with the specified key.

c#
public bool TryGet<T>(string key, out T? value);

View source

Type Parameters ​

NameDescription
TThe type of the property.

Parameters ​

NameTypeDescription
keyStringThe key of the property.
valueTThe value of the property if it exists.

Returns ​

Boolean

true if the property exists, false otherwise.