OptionalExtensionsCastT Method

Casts the type of an OptionalT using only the C# cast operator.

Definition

Namespace: Avalonia.Data
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static Optional<T> Cast<T>(
	this Optional<Object> value
)

Parameters

value  OptionalObject
The binding value.

Type Parameters

T
The target type.

Return Value

OptionalT
The cast value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type OptionalObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also