Is is possible to list our the variable names from the instance and it value.
public class Car
{
public string Color;
public string Model;
public string Made;
}
protected void Page_Load(object sender, EventArgs e)
{
//Create new instance
Car MyCar = new Car();
MyCar.Color = "Red";
MyCar.Model = "NISSAN";
MyCar.Made = "Japan";
//SOMETHING HERE
foreach (MyCar Variable in MyCar)
{
Response.Write("<br/>Variable Name"+ "XXX"+ "Variable Value");
}
}