public DicomAge(int count, DicomAgeUnits units) { Platform.CheckArgumentRange(count, 0, 999, "count"); _count = count; _units = units; }
public string ToString(DicomAgeUnits units) { switch (units) { case DicomAgeUnits.Days: return(string.Format("{0:000}D", (int)this.TotalDays)); case DicomAgeUnits.Weeks: return(string.Format("{0:000}W", (int)this.TotalWeeks)); case DicomAgeUnits.Months: return(string.Format("{0:000}M", (int)this.TotalMonths)); default: case DicomAgeUnits.Years: return(string.Format("{0:000}Y", (int)this.TotalYears)); } }