Skip to main content

CriteriaOperator.LegacyToString() Method

Returns the string representation of the criteria specified by the current CriteriaOperator instance.

Namespace: DevExpress.Data.Filtering

Assembly: DevExpress.Data.v22.2.dll

NuGet Package: DevExpress.Data

Declaration

public string LegacyToString()

Returns

Type Description
String

A string equivalent of the current CriteriaOperator instance.

Remarks

Unlike the CriteriaOperator.ToString method, the LegacyToString method removes value suffixes (such as ‘m’, ‘M’, ‘l’, ‘L’, ‘f’, ‘F’, etc.) used to specify types of numeric literals in criteria operands. You can call the LegacyToString method to display the returned string in a UI, or save it to an application log. However, this string is actually not in SQL format and cannot be considered as such. If you want to use the string for building SQL queries or for filtering DataView, use the approach described in the How to convert the CriteriaOperator to the corresponding filter string in order to use it for building SQL queries or for filtering the DataView Knowledge Base article.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the LegacyToString() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also