Skip to main content

FormatConditionRuleBase.ConvertToDecimal(Object) Method

Converts the specified object to the nullable decimal type.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public static decimal? ConvertToDecimal(
    object value
)

Parameters

Name Type Description
value Object

The object to be converted to the nullable decimal type.

Returns

Type Description
Nullable<Decimal>

The result of the conversion.

Remarks

If the input value is of the decimal type, the ConvertToDecimal method returns this value as a result. Otherwise, the conversion of the input value is performed as follows:

The type of the value parameter Result of the ConvertToDecimal method
DateTime DateTime.Ticks
Any numeric value The result of converting this value using the Convert.ToDecimal method.
Other cases null
See Also