GS1Codetext.TryParse

GS1Codetext.TryParse method

Attempts to parse a bracketed GS1 element string in the form (AI)value(AI)value and returns structured validation errors. A literal ‘(’ inside a value must be written as (; no other escape sequence is supported, and ‘)’ does not require escaping.

public static bool TryParse(string value, out GS1Codetext result, 
    out GS1ValidationResult validationResult)
ParameterTypeDescription
valueStringBracketed GS1 element string to parse.
resultGS1Codetext&When this method returns true, contains the parsed GS1 codetext; otherwise null.
validationResultGS1ValidationResult&Contains the validation result, or null when value is null.

Return Value

True when parsing succeeds; otherwise false.

See Also