public override string ToString() { string lcString = Bike.Serial.ToString() + "\t" + DateOfOrder.ToString() + "\t"; lcString = lcString + "\t" + Bike.Brand + "\t"; lcString = lcString + Bike.ModelName.PadRight(40 - Bike.ModelName.Length) + "\t"; lcString = lcString + PriceAtOrder.ToString(); return(lcString); }
public override string ToString() { string lcString = Bike.Serial.ToString() + " " + DateOfOrder.ToShortDateString() + "\t"; if (Bike.Brand.Length > 20) { lcString = lcString + Bike.Brand.Substring(0, 20) + "\t"; } else { lcString = lcString + Bike.Brand.PadRight(20) + "\t"; } if (Bike.ModelName.Length > 20) { lcString = lcString + Bike.ModelName.Substring(0, 20) + "\t"; } else { lcString = lcString + Bike.ModelName.PadRight(20) + "\t"; } lcString = lcString + PriceAtOrder.ToString(); return(lcString); }