示例#1
0
        public override string UniqueVehicleInfo()
        {
            string lisenceTypeInfo    = "Motorcycle License Type: " + r_LicenseType.ToString();
            string engineCapacityInfo = "Motorcycle Engine Capacity: " + r_EngineCapacityInCC + " CC";

            return(string.Format("{0}\n{1}", lisenceTypeInfo, engineCapacityInfo));
        }
        public override string ToString()
        {
            return(string.Format(base.ToString() +
                                 @"
License Type: {0}
Engine Capcity: {1}", m_LicenseType.ToString(), m_EngineCapacity.ToString()));
        }
示例#3
0
 public override string ToString()
 {
     return(string.Format("{1}{0}License type: {2}",
                          Environment.NewLine,
                          base.ToString(),
                          m_LicenseType.ToString()));
 }
示例#4
0
 public override string ToString()
 {
     return(string.Format(
                "License Type: {0}\nEngineVolume: {1}\n{2}",
                m_LicenseType.ToString(),
                m_EngineVolume.ToString(),
                base.ToString()));
 }
示例#5
0
        public override string ToString()
        {
            string motorcycleDetials = base.ToString();

            motorcycleDetials += "License type: " + m_LicenseType.ToString() + System.Environment.NewLine;
            motorcycleDetials += "Engine capacity: " + r_EngineCapacity.ToString() + System.Environment.NewLine;
            return(motorcycleDetials);
        }
示例#6
0
        public override List <string> GetDetails()
        {
            List <string> detailsStrs = base.GetDetails();

            detailsStrs.Add("License type: " + m_LicenseType.ToString());
            detailsStrs.Add("Engine capacity: " + m_EngineCapacity.ToString());
            return(detailsStrs);
        }
示例#7
0
        public override Dictionary <string, string> GetDetails()
        {
            Dictionary <string, string> motorbikeDetails = base.GetDetails();

            motorbikeDetails.Add("License type", m_LicenseType.ToString());

            return(motorbikeDetails);
        }
示例#8
0
        public override string ToString()
        {
            StringBuilder infoOfMotorcycle = new StringBuilder();

            infoOfMotorcycle.AppendLine("Type of vehicle : Motorcycle");
            infoOfMotorcycle.AppendLine("Licence Type " + m_LicenseType.ToString());
            infoOfMotorcycle.AppendLine("The volume of the engine is: " + m_EngineVolume);
            return(infoOfMotorcycle.ToString());
        }
示例#9
0
        public override string ToString()
        {
            StringBuilder toReturnBuilder = new StringBuilder();

            toReturnBuilder.Append(base.ToString());
            toReturnBuilder.AppendFormat("License Type: {0}{1}", m_LicenseType.ToString(), Environment.NewLine);
            toReturnBuilder.AppendFormat("Engine Volume: {0}{1}", m_EngineVolume, Environment.NewLine);
            return(toReturnBuilder.ToString());
        }
示例#10
0
        public override string ToString()
        {
            StringBuilder Motorcycle = new StringBuilder();

            Motorcycle.AppendLine();
            Motorcycle.AppendFormat(base.ToString());
            Motorcycle.AppendFormat("license type  is: {0}, ", m_LicenseType.ToString());
            Motorcycle.AppendFormat("enginge capacity is: {0}.", m_EngineCapacity.ToString());
            return(Motorcycle.ToString());
        }
示例#11
0
        public override string ToString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendFormat(
                @"License Type : {0}
Engine Volume : {1}", m_LicenseType.ToString(), m_EngineVolume.ToString());

            return(base.ToString() + stringBuilder.ToString());
        }
示例#12
0
        public override string ToString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendFormat(
                @"License Type : {0}
Engine capacity : {1}
Vehicle type : {2}", m_LicenseType.ToString(), m_EngineCapacity.ToString(), VehicleType.ToString());

            return(base.ToString() + stringBuilder.ToString());
        }
示例#13
0
        public override string GetDetails()
        {
            StringBuilder motorcycleDetails = new StringBuilder();

            motorcycleDetails.AppendFormat("{0}", base.GetDetails());
            motorcycleDetails.AppendFormat("License type: {0}{1}", m_LicenseType.ToString(), Environment.NewLine);
            motorcycleDetails.AppendFormat("Engine displacement: {0}{1}", m_EngineDisplacement.ToString(), Environment.NewLine);
            motorcycleDetails.AppendFormat("{0}{1}", EnergySource.GetEnergySourceDetails(), Environment.NewLine);
            motorcycleDetails.AppendFormat("{0}", GetWheelsDetails());

            return(motorcycleDetails.ToString());
        }
示例#14
0
        public override string ToString()
        {
            StringBuilder motorcycleDataBuilder = new StringBuilder();

            motorcycleDataBuilder.AppendLine("---Motorcycle Details---");
            motorcycleDataBuilder.AppendFormat("{0}{1}", base.ToString(), Environment.NewLine);
            motorcycleDataBuilder.AppendLine("---Unique Motorcycle Details---");
            motorcycleDataBuilder.AppendFormat("Engine Capacity: {0}{1}", m_MotorCapacity, Environment.NewLine);
            motorcycleDataBuilder.AppendFormat("License Type: {0}{1}", m_LicenseType.ToString(), Environment.NewLine);

            return(motorcycleDataBuilder.ToString());
        }
示例#15
0
        public override string ToString()
        {
            StringBuilder carDisplayString = new StringBuilder();

            carDisplayString.AppendLine(this.ToStringVehicle());
            carDisplayString.AppendFormat(
                "\tType of registration: {0}{2}\tMotor volume: {1}",
                r_LicenseType.ToString(),
                r_EngineVolume,
                Environment.NewLine);

            return(carDisplayString.ToString());
        }
示例#16
0
        public override string ToString()
        {
            string motorcycleInformationOutput = string.Format(
                @"{0}
Number of Wheels: {1}
License Type: {2}
Engine Capacity: {3}cc",
                VehicleToString(),
                (int)eNumberOfWheels.Motorcycle,
                m_LicenseType.ToString(),
                m_EngineCapacity);

            return(motorcycleInformationOutput);
        }
示例#17
0
 public override string ToString()
 {
     return(string.Format(@"Motorcycle's license type: {0} Motorcycle's engine volume: {1}", m_LicenseType.ToString(), m_EngineVolume.ToString()));
 }
示例#18
0
        public override string ToString()
        {
            string motorcucleInfo;

            motorcucleInfo = string.Format("{0}" + Environment.NewLine + "Engine capacity: {1}" + Environment.NewLine + "License type: {2}", VehicleData(), m_EngineCapacity, m_LicenseType.ToString());
            return(motorcucleInfo);
        }
示例#19
0
 public override void GetDetailesOwnerVehicle(List <string> io_listOfDetailes) // this function add the Motorcycle detailes to the list
 {
     GetDetailesVehicle(io_listOfDetailes);
     io_listOfDetailes.Add(string.Format("License Type:{0}", m_licenseType.ToString()));
     io_listOfDetailes.Add(string.Format("Engine Volume In CC:{0}", m_engineVolumeInCC.ToString()));
 }
示例#20
0
 public override string GetSpecificDetails()
 {
     return(string.Format("The license type: {0}, The engine capacity: {1}", m_LicenseType.ToString(), m_EngineCapacity));
 }