private void Save() { System.IO.StreamWriter writer = new System.IO.StreamWriter("Files/Carro.txt", true); writer.WriteLine(VIN + "," + Modelo + "," + Color + "," + Marca + "," + TipoCombustible.ToString() + "," + TipoTransmision.ToString() + "," + IdCarro.ToString()); writer.Close(); }
public override string ToString() { return(VIN.ToString() + "\t" + Modelo + "\t" + Color + "\t" + Marca + "\t" + TipoCombustible.ToString() + "\t" + TipoTransmision.ToString() + "\t" + IdCarro.ToString()); }
//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)); }