Fields

ZeroTolerance

#
public const double ZeroTolerance = 1E-16

Methods

CustomError

#
Create the custom formatted conversion exception.
public static ConversionException CustomError(
typeA,
Source data type for conversion.
typeB,
Target data type of conversion.
message,
Custom error text with {0} for nameA and {1} for nameB.
nameA = null,
Optional custom type name.
nameB = null
Optional custom type name.
)

InfiniteConversion

#
Create the standard 'infinite conversion' exception, usually involving infinite values in the instance of typeA.
public static ConversionException InfiniteConversion(
typeA,
Source data type for conversion.
typeB,
Target data type of conversion.
nameA = null,
Optional custom type name.
nameB = null
Optional custom type name.
)

InvalidConversion

#
Create the standard 'invalid conversion' exception, usually involving NaN or Unset values in the instance of typeA.
public static ConversionException InvalidConversion(
typeA,
Source data type for conversion.
typeB,
Target data type of conversion.
nameA = null,
Optional custom type name.
nameB = null
Optional custom type name.
)

IsZero

#
Test whether a number is considered zero by conversion logic.
protected static bool IsZero(
value
)

MissingConversion

#
Create the standard 'missing conversion' exception.
public static ConversionException MissingConversion(
typeA,
Source data type for conversion.
typeB,
Target data type of conversion.
nameA = null,
Optional custom type name.
nameB = null
Optional custom type name.
)

OverflowConversion

#
Create the standard 'overflow conversion' exception. This ought to be thrown when the source value exceeds the range of the target type.
public static ConversionException OverflowConversion(
typeA,
Source data type for conversion.
typeB,
Target data type of conversion.
nameA = null,
Optional custom type name.
nameB = null
Optional custom type name.
)