OptionalExtensionsCastT Method
Casts the type of an
OptionalT using only the C# cast operator.
Namespace: Avalonia.DataAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
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>
- value OptionalObject
- The binding value.
- T
- The target type.
OptionalTThe cast value.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).