Beispiel #1
0
        public override string ToString()
        {
            StringBuilder strCar = new StringBuilder();

            strCar.AppendLine("Vehicle Type: Car");
            strCar.Append(base.ToString());
            strCar.AppendFormat("Amount Of Doors: {0}", m_AmountOfDoors.ToString()).AppendLine();
            strCar.AppendFormat("Color: {0}", m_Color.ToString());

            return(strCar.ToString());
        }
Beispiel #2
0
        public override string ToString()
        {
            string result;

            result = string.Format(
                @"{0}
Car's Color: {1}
Car's door quantity: {2}
",
                VehicleDetails(),
                m_Color.ToString(),
                m_AmountOfDoors.ToString());
            return(result);
        }