An NDoc Documented Class Library

BaseCompareValidator.Format Method 

Returns a formatted string.

protected string Format(
   string value
);

Parameters

value
String value of Typeto be formatted prior to conversion to an internal System type representation.

Return Value

true if value can be converted, false otherwise.

Remarks

Format is used to clean a string from any unnecessary UI artifacts before converting it from the type specified by Type to the specified Systemtype. For example, a Currency type is internally converted to System.Decimal. From a UI point of view, it is perfectly valid to include $ and . characters in a Currency field on a UI, but such a field cannot be converted to System.Decimal. Format is used to strip any characters that won't make the conversion from UI Type to internal System type.

The following table shows what ValidationDataTypes are converted to what internal System types.

ValidationDataTypeSystem Type
CurrencySystem.Decimal
DateSystem.DateTime
DoubleSystem.Double
IntegerSystem.Int32
StringSystem.String

See Also

BaseCompareValidator Class | BaseCompareValidator Members | Genghis.Windows.Forms Namespace