public class Car
{
public string Color { get; set; }
public string Model { get; set; }
}
How I call "Car.Color" or "Car.Model" from a variable?
Ex.
string MyVariable = "Color";
MyListBox.Items.Add(Car.Model); //It Works Ok
MyListBox.Items.Add(Car.MyVariable); // How??
Regards.