Method GetOrDefault
GetOrDefault<T>()
Gets a singleton previously defined in this context bag via its type T.
Returns the default value if the object is not defined.
public T? GetOrDefault<T>() where T : notnull
Returns
- T
The object of type
Tif it exists; otherwise, null.
Type Parameters
TThe type of the object defined in this context bag.
English
Русский
Português
Español
Deutsch
中文 (简体)
日本語