Skip to content

DateTimeToNSDateConverter.TryConvert(DateTime, object?, NSDate?) method

Defined in

Type: DateTimeToNSDateConverter Namespace: ReactiveUI Assembly: ReactiveUI.Reactive.dll

Applies to

net10.0-ios26.0, net10.0-ios26.0, net10.0-macos26.0, net10.0-macos26.0, net10.0-maccatalyst26.0, net10.0-maccatalyst26.0, net10.0-tvos26.0, net10.0-tvos26.0

public override bool TryConvert(DateTime from, object? conversionHint, out NSDate? result)

View source

Inherited documentation

These docs were inherited from BindingTypeConverter<DateTime, NSDate>. The member doesn't override them on this type.

Summary: Convert a value to the target type in a type-safe manner.

Parameters

NameTypeDescription
fromDateTimeThe value to convert.
conversionHintobject?Implementation-defined hint for conversion (e.g., format string, locale).
out resultNSDate?The converted value. May be null when conversion succeeds for nullable targets.

Returns: bool -- true if conversion succeeded; otherwise, false.

Remarks

This method is AOT-safe as all types are known at compile time. No reflection or boxing is required for value types.

When this method returns true, the result parameter may still be null for converters that map null inputs or empty values to nullable targets.