OptionExtensions.ValueOrDefault(Optional) method¶
Defined in
Type: OptionExtensions
Namespace: DynamicData.Kernel
Assembly: DynamicData.dll
Applies to
net10.0, netstandard2.0
public static T? ValueOrDefault<T>(this in Optional<T> source) where T : notnull
Summary: Returns the value if the optional has a value, otherwise returns the default value of T.
Type parameters
| Name | Description |
|---|---|
T | The type of the item. |
Parameters
| Name | Type | Description |
|---|---|---|
in source | [Optional | The source. |
Returns: T? -- The value or default.