[]
        
(Showing Draft Content)

C1.Win.Calendar.DateTimeRangeConverter.ConvertFrom

ConvertFrom Method

ConvertFrom(ITypeDescriptorContext, CultureInfo, object)

Converts the specified object to a DateTimeRange.

Declaration
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Public Overrides Function ConvertFrom(context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object
Parameters
Type Name Description
ITypeDescriptorContext context

The type descriptor context.

CultureInfo culture

The culture information used for parsing dates.

object value

The value to convert. Expected to be a formatted string.

Returns
Type Description
object

A DateTimeRange instance parsed from the input string, or null if the input is empty.

Overrides
Exceptions
Type Condition
FormatException

Thrown when the input string is not in the expected format or contains invalid date values.