Ejemplo n.º 1
0
        public override string ToString()
        {
            string DataOfElectroniCar;

            DataOfElectroniCar = string.Format("Color Of Car: {0}{3}" +
                                               "Amount Of Doors: {1}{3}" +
                                               "Number Of Wheels In Car: {2}{3}", ColorOfCar.ToString(), AmountOfDoors.ToString(),
                                               k_NumberOfWheelsInCar.ToString(), Environment.NewLine);

            return(DataOfElectroniCar + base.ToString());
        }
Ejemplo n.º 2
0
        public override string ToString()
        {
            string CarInfo = string.Format(
                @"
Your car info:
-----------------
Car Color is: {0}
Car number of doors is: {1}
Car number of wheels is: {2}

Wheels status is:
----------------- 
Current PSI: {3}
Manufacturer Name: {4}",

                ColorOfCar.ToString(),
                DoorsOfCar.ToString(),
                WheelsOfVehicle.Length.ToString(),
                WheelsOfVehicle[0].CurrentPSI.ToString(),
                WheelsOfVehicle[0].ManufecturerName.ToString());


            return(CarInfo);
        }