2
I’m doing a simple application registration in array, but when run appears the following result in the console instead of the information I passed in the parameter.
Follows the code:
static void Main(string[] args)
{
Veiculo[] veiculosArray = new Veiculo[10];
veiculosArray[0] = new Veiculo("BMW", "DSR6646");
Console.WriteLine(veiculosArray[0]);
Console.ReadKey();
Console.ReadKey();
}
Vehicle Class:
class Veiculo
{
public string Modelo { get; set; } = string.Empty;
public string Placa { get; set; } = string.Empty;
public Veiculo(string modelo, string placa)
{
Modelo = modelo;
Placa = placa;
}
}
Now you can vote on everything on the site, take a look at [tour] how it works. You can vote here too, the vote is different from the acceptance.
– Maniero