Click or drag to resize

ExpressionsCast Method (String, 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(
	string propertyName,
	string typeName
)

Parameters

propertyName
Type: SystemString
name of the property supplying the value to cast
typeName
Type: SystemString
is type to cast to

Return Value

Type: CastExpression
expression
See Also