CanCast<T> Method
Returns a value indicating whether value can be casted to the specified type. If value is null, checks if instances of that type can be null.
Definition
Namespace: Avalonia.Utilities
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static bool CanCast<T>(
Object? value
)
Public Shared Function CanCast(Of T) (
value As Object
) As Boolean
static member CanCast :
value : Object -> bool
Parameters
- Object
- The value to check if cast possible
Type Parameters
- The type to cast to
Return Value
Boolean
True if the cast is possible, otherwise false.