Пример #1
0
        public override string ToString()
        {
            return(string.Format(@"Vehicle model is: {0}
Vehicle license plate number is: {1}
{2}
{3}", m_VehicleModel, m_LicencePlate, m_Owner.ToString(), r_Wheels[0].ToString()));
        }
Пример #2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("These are all the details of the wanted vehicle: ");
            sb.AppendLine(m_VehicleOwner.ToString());
            sb.AppendFormat("Car condition: {0}\n", Enum.GetName(typeof(Vehicle.eStatusOfVehicle), VehicleStatus));
            sb.AppendFormat(Vehicle.ToString());
            return(sb.ToString());
        }