Пример #1
0
        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();
        }
Пример #2
0
 public override string ToString()
 {
     return(VIN.ToString() + "\t" + Modelo + "\t" + Color + "\t" + Marca + "\t" +
            TipoCombustible.ToString() + "\t" + TipoTransmision.ToString() + "\t" + IdCarro.ToString());
 }
Пример #3
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));
        }