示例#1
0
 public override string ToString() //implement ToString for future printing
 {
     return(VIN.PadRight(10, ' ') + "\t" + Make);
 }
示例#2
0
 public virtual void PrintInfo() //PrintInfo method to print VIN and Make
 {
     Console.WriteLine(VIN.PadRight(10, ' ') + "\t" + Make);
 }
示例#3
0
 public override string ToString()                                                    //implement ToString for future printing
 {
     return(VIN.PadRight(10, ' ') + "\t" + Make.PadRight(10, ' ') + "\t" + TeamName); //added padding for better display
 }
示例#4
0
        //public string List()
        //{
        //    string todos = "";
        //    foreach (Carro Carro in ListaCarros)
        //    {
        //        todos += Carro.ToString();
        //    }
        //    return todos;
        //}

        /// <summary>
        /// Muestra los datos de un Carro
        /// </summary>
        public void Show()
        {
            Console.WriteLine(VIN.PadRight(5) + Modelo.PadLeft(2).PadRight(4) + Color.PadRight(10) + Marca.PadRight(10) +
                              TipoCombustible.ToString().PadRight(10) + TipoTransmision.ToString().PadRight(10).PadLeft(12) + IdCarro.ToString().PadRight(2).PadLeft(4));
        }
示例#5
0
 public override void PrintInfo() //print info method override Car class to print variables + TeamName
 {
     Console.WriteLine(VIN.PadRight(10, ' ') + "\t" + Make.PadRight(10, ' ') + "\t" + TeamName);
 }