Created
January 21, 2017 02:48
-
-
Save gaverdugo/f2c43900292c9c5e50a434764bb8d79a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace PVI_ca1 | |
{ | |
class Auto | |
{ | |
public string Color; | |
public string Marca; | |
public string Modelo; | |
public string Placas; | |
public int Potencia; | |
public int Anio; | |
public void VerAuto() | |
{ | |
Console.WriteLine("Color: {0}\nMarca: {1}\nModelo: {2}\nPlacas: {3}\nPotencia: {4}\nAño: {5}", Color, Marca, Modelo, Placas, Potencia, Anio); | |
} | |
} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.BackgroundColor = ConsoleColor.Red; | |
Console.ForegroundColor = ConsoleColor.Black; | |
Auto bocho = new Auto(); | |
bocho.Color = "Rojo"; | |
bocho.Marca = "Volkswagen"; | |
bocho.Modelo = "A123"; | |
bocho.Placas = "WRD345"; | |
bocho.Potencia = 3000; | |
bocho.Anio = 1956; | |
bocho.VerAuto(); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment