} // DeepClone public override string ToString() { string closedDateStr = ClosedDate.HasValue ? string.Format(" (closed on {0})", ClosedDate.DateStr()) : string.Empty; return(string.Format( "on {0}: {1} at {2}{3}", Date.DateStr(), Principal.ToString("C2", Culture), InterestRate.ToString("P1", Culture), closedDateStr )); } // ToString
} // DeepClone public override string ToString() { string closedDateStr = ClosedDate.HasValue ? string.Format(" (closed on {0})", ClosedDate.DateStr()) : string.Format(" (open principal {0})", OpenPrincipal.ToString("C2", Library.Instance.Culture)); string repaymentsStr = HasRepayments ? string.Format(" (repaid: {0})", string.Join(", ", this.principalRepayments)) : string.Empty; return(string.Format( "on {0}: {1} at {2}{3}{4}", Date.DateStr(), Principal.ToString("C2", Library.Instance.Culture), InterestRate.ToString("P1", Library.Instance.Culture), closedDateStr, repaymentsStr )); } // ToString