TypeUtilitiesCanCastT 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.
Namespace: Avalonia.UtilitiesAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static bool CanCast<T>(
Object? value
)
Public Shared Function CanCast(Of T) (
value As Object
) As Boolean
static member CanCast :
value : Object -> bool
- value Object
- The value to check if cast possible
- T
- The type to cast to
BooleanTrue if the cast is possible, otherwise false.