コード例 #1
0
        public string GetAllDetalies()
        {
            return(string.Format(@"
License Type:{0}
Engine Volume:{1}",
                                 LicenseType.ToString(), m_EngineVolume.ToString()));
        }
コード例 #2
0
        public override string GetSpecificDetails()
        {
            string details = string.Format(
                @"License type: {0}
Engine volume: {1}",
                m_LicenseType.ToString(),
                m_EngineVolume.ToString());

            return(details);
        }
コード例 #3
0
        public override string ToString()
        {
            string DataOfMotorcycle;

            DataOfMotorcycle = string.Format("License Type: {0}{3}" +
                                             "Engine Volume In Cc: {1}{3}" +
                                             "Number Of Wheels: {2}{3}", LicenseType.ToString(), EngineVolumeInCc.ToString()
                                             , MotorcycleNumOfWheels.ToString(), Environment.NewLine);

            return(DataOfMotorcycle + base.ToString());
        }
コード例 #4
0
        public override string ToString()
        {
            string motorcycle = string.Format(
                "{0}The motorcycle license type is {1} and his engine capacity is {2} CC{3}",
                base.ToString(),
                LicenseType.ToString(),
                EngineCapacityInCC,
                Environment.NewLine);

            return(motorcycle);
        }