Normally, criteria value operands (OperandValue objects) are automatically passed as standard parameters to the resulting SQL queries, generated based on criteria expressions. The ConstantValue allows you to embed in-line parameters into the resulting SQL queries. With in-line parameters, you can improve performance when executing a number of SQL queries with matching constants passed as parameters. To accomplish this, replace OperandValue with ConstantValue in your criteria expression as shown below.
Dim filter As CriteriaOperator = CriteriaOperator.Parse("LastName = 'Smith'")
If you pass constant operand values using positional parameters (see the corresponding section in Criteria Language Syntax), they are translated, as usual, to OperandValue objects, not ConstantValue objects. The following code will produce criteria with normal query parameters, rather than in-line.