Optional<T>.

GetValueOrDefault<TResult>() Method

Summary

Gets the value if present, otherwise the default value.
Namespace
Avalonia.Data
Containing Type
Optional<T>

Syntax

public TResult GetValueOrDefault<TResult>()

Type Parameters

Name Description
TResult

Return Value

Type Description
TResult The value if present and of the correct type, `default(TResult)` if the value is not present or of an incorrect type.