Summary
Gets the value if present, otherwise a default value.
- Namespace
- Avalonia
.Data - Containing Type
- Optional
<T>
Syntax
public TResult GetValueOrDefault<TResult>(TResult defaultValue)
Type Parameters
Name | Description |
---|---|
TResult |
Parameters
Name | Type | Description |
---|---|---|
defaultValue | TResult | The default value. |
Return Value
Type | Description |
---|---|
TResult | The value if present and of the correct type, `default(TResult)` if the value is present but not of the correct type or null, or defaultValue if the value is not present. |