Table of Contents

Method Parse

Namespace
Bonsai
Assembly
Bonsai.Core.dll

Parse(Expression, string)

Creates an Expression representing the result of parsing a string with the specified pattern.

public static Expression Parse(Expression expression, string pattern)

Parameters

expression Expression

An Expression that represents the string to parse.

pattern string

The parse pattern to match, including data type format specifiers. If pattern is null, the input string is returned.

Returns

Expression

An Expression that represents the result of parsing the specified string.

Parse(Expression, string, params string[])

Creates an Expression representing the result of first splitting a string using separator tokens and then parsing each of the elements against the specified pattern.

public static Expression Parse(Expression expression, string pattern, params string[] separator)

Parameters

expression Expression

An Expression that represents the string to parse.

pattern string

The parse pattern to match, including data type format specifiers. If pattern is null, each of the resulting element strings is returned unchanged.

separator string[]

An optional array of delimiters used for splitting the string into individual elements before parsing. If the array is empty, the input string is parsed directly without further processing.

Returns

Expression

An Expression that represents the result of splitting and parsing the specified string. If a separator array is specified, the resulting expression will be of type Array.