TypeUtilitiesTryConvert Method
Try to convert a value to a type by any means possible.
Namespace: Avalonia.UtilitiesAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static bool TryConvert(
Type to,
Object? value,
CultureInfo? culture,
out Object?? result
)
Public Shared Function TryConvert (
to As Type,
value As Object,
culture As CultureInfo,
<OutAttribute> ByRef result As Object
) As Boolean
static member TryConvert :
to : Type *
value : Object *
culture : CultureInfo *
result : Object byref -> bool
- to Type
- The type to convert to.
- value Object
- The value to convert.
- culture CultureInfo
- The culture to use.
- result Object
- If successful, contains the convert value.
BooleanTrue if the cast was successful, otherwise false.