Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
 public override string ToString()
 {
     return(Date + ", " + ValuePerHour.ToString("F2", CultureInfo.InvariantCulture) + ", " + Hours);
 }
Ejemplo n.º 3
0
 public override string ToString()
 {
     return($"{Date.ToShortDateString()}, ValuePerHour: {ValuePerHour.ToString("F2")}, Hours: {Hours}");
 }