Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

FormatConditionRuleBase.ConvertToDecimal(Object) Method

Converts the specified object to the nullable decimal type.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.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