Skip to main content

CriteriaOperator.ToBasicStyleString(CriteriaOperator, out OperandValue[]) Method

Converts the specified expression into its equivalent string in VB style.

Namespace: DevExpress.Data.Filtering

Assembly: DevExpress.Data.v23.2.dll

NuGet Package: DevExpress.Data


public static string ToBasicStyleString(
    CriteriaOperator criteria,
    out OperandValue[] criteriaParametersList


Name Type Description
criteria CriteriaOperator

A CriteriaOperator object that represents the expression to convert.

criteriaParametersList OperandValue[]

[out] Receives the values that are marked by a question mark character in the result string.


Type Description

A string representation of the specified expression.


This example demonstrate how to use the ToBasicStyleString method:

OperandValue[] parameters;
CriteriaOperator filterCriteria = 
    CriteriaOperator.Parse("[Category] == ? && [Price] < ?", out parameters);

parameters[0].Value = "Saloon";
parameters[1].Value = 100000;

// Returns "[Category] = ? AND [Price] < ?"
string filterString = CriteriaOperator.ToBasicStyleString(filterCriteria, out parameters); 

To convert the string representation of an expression to its CriteriaOperator equivalent, use the CriteriaOperator.Parse method.


The ToBasicStyleString method returns a string representation of the criteria which can be displayed in a UI or saved in application log. However, this string is actually not SQL and cannot be considered as such.

See Also