IBindingFallbackConverter.TryConvert(Type, object, Type, object?, object?) method¶
Defined in
Type: IBindingFallbackConverter
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
bool TryConvert(Type fromType, object from, Type toType, object? conversionHint, out object? result)
Summary: Attempts to convert the value to the target type.
Parameters
| Name | Type | Description |
|---|---|---|
fromType | Type | The runtime source type (guaranteed non-null). |
from | object | The value to convert (guaranteed non-null). |
toType | Type | The target type (guaranteed non-null). |
conversionHint | object? | Implementation-defined conversion hint (e.g., format string, culture). |
out result | object? | The converted value. Guaranteed non-null when this method returns true. |
Returns: bool -- true if conversion succeeded; otherwise, false.
Remarks
When this method returns true, the result parameter
is guaranteed to be non-null (modern nullability contract).
Null input handling is performed by the dispatch layer. This method will never receive
null as the from parameter.