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.

Definition

Namespace: Avalonia.Utilities
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static bool CanCast<T>(
	Object? value
)

Parameters

value  Object
The value to check if cast possible

Type Parameters

T
The type to cast to

Return Value

Boolean
True if the cast is possible, otherwise false.

See Also