Class Age

Class Age

Namespace: Aspose.Medical.Dicom.Elements
Assembly: Aspose.Medical.dll (25.11.0)

Encapsulates ‘Age’ in the AgeString VR.

public sealed class Age

Inheritance

object Age

Inherited Members

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

Age()

public Age()

Properties

Number

Numerical age value. Read / Write System.Int32.

public int Number { get; set; }

Property Value

int

Units

Measurement unit of the age. Read / Write Aspose.Medical.Dicom.Elements.Age.Unit.

public Age.Unit Units { get; set; }

Property Value

Age . Unit

Methods

Parse(string)

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

public static Age Parse(string ageText)

Parameters

ageText string

Text representation of an age.

Returns

Age

The parsed Aspose.Medical.Dicom.Elements.Age.

Exceptions

MedicalApiException

Unable to parse age units from the ageText.

ArgumentException

AGE must be in format: 1-3 digits, 1 age unit symbol, but it has more than 4 symbols.

ToString()

public override string ToString()

Returns

string