public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("Name: "); sb.AppendLine(Name); sb.Append("Hours: "); sb.AppendLine(Hours.ToString()); sb.Append("ValuePerHou: "); sb.AppendLine(ValuePerHour.ToString("F2", CultureInfo.InvariantCulture)); sb.Append("Payment: "); sb.AppendLine(Payment().ToString("F2", CultureInfo.InvariantCulture)); return(sb.ToString()); }
public override string ToString() { return(Date + ", " + ValuePerHour.ToString("F2", CultureInfo.InvariantCulture) + ", " + Hours); }
public override string ToString() { return($"{Date.ToShortDateString()}, ValuePerHour: {ValuePerHour.ToString("F2")}, Hours: {Hours}"); }