public override string ToString() //implement ToString for future printing { return(VIN.PadRight(10, ' ') + "\t" + Make); }
public virtual void PrintInfo() //PrintInfo method to print VIN and Make { Console.WriteLine(VIN.PadRight(10, ' ') + "\t" + Make); }
public override string ToString() //implement ToString for future printing { return(VIN.PadRight(10, ' ') + "\t" + Make.PadRight(10, ' ') + "\t" + TeamName); //added padding for better display }
//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)); }
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); }