Cast<T> Method
Casts the type of an Optional(T) using only the C# cast operator.
Definition
Namespace: Avalonia.Data
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static Optional<T> Cast<T>(
this Optional<Object> value
)
<ExtensionAttribute>
Public Shared Function Cast(Of T) (
value As Optional(Of Object)
) As Optional(Of T)
[<ExtensionAttribute>]
static member Cast :
value : Optional<Object> -> Optional<'T>
Parameters
Type Parameters
- The target type.
Return Value
Optional(T)
The cast value.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Optional(Object). 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).