Click or drag to resize

FormatConverterT, TFormatTypeGetConversionDistance Method

Gets the number of intermediate conversions that must be done to convert from from to to. For example, if a conversion function is defined to directly convert between the types, 1 will be returned. If the two types are identical, 0 will be returned. If no conversion exists at all, MaxValue will be returned.

Namespace:  AGI.Foundation.Infrastructure
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 22.1.413.0 (22.1.413.0)
public int GetConversionDistance(
	TFormatType from,
	TFormatType to


Type: TFormatType
The source format.
Type: TFormatType
The destination format.

Return Value

Type: Int32
The number of conversion functions that must be invoked to convert between the formats.
See Also