Click or drag to resize

ExpressionsCast Method (Expression, String)

Cast function, casts the result on an expression to the desired type, or returns null if the type cannot be casted to the type.

The list of types can include fully-qualified class names plus any of the primitive type names: byte, char, short, int, long, float, double, boolean. Alternatively to "System.String" the simple "string" is also permitted.

Type checks include all superclasses and interfaces of the value returned by the expression.

Namespace:  com.espertech.esper.common.client.soda
Assembly:  NEsper.Common (in NEsper.Common.dll) Version: 8.0.0.0
Syntax
C#
public static CastExpression Cast(
	Expression expression,
	string typeName
)

Parameters

expression
Type: com.espertech.esper.common.client.sodaExpression
returns the value to cast
typeName
Type: SystemString
is type to cast to

Return Value

Type: CastExpression
expression
See Also