Parse

Age.Parse method

Converts the text representation of an age to its typed equivalent.

public static Age Parse(string ageText)
ParameterTypeDescription
ageTextStringText representation of an age.

Return Value

The parsed Age.

Exceptions

exceptioncondition
MedicalApiExceptionUnable to parse age units from the ageText.
ArgumentExceptionAGE must be in format: 1-3 digits, 1 age unit symbol, but it has more than 4 symbols.

See Also