Message Board - Misc/Message Board


view all discussions  ·  create a new discussion  ·  view all topics


 M Reply » 
posted by: M @ 6:54:20 PM  ·  Monday, March 17, 2003
private void mnuFileLoad_Click(object sender, System.EventArgs eve)
{
Vehicle honda = new Vehicle();
honda.year = 1990;
honda.make = "Honda"; // choosen properties, also order specific,
honda.model = "Accord"; // ie: you wouldn't put year before price...
honda.whole = 2500;
honda.retail = 3700;

string newVehicleDetails = string.Concat(honda.year," ", honda.make," ", honda.model);
honda.name = newVehicleDetails; Vehicles.Add(honda);
cboxVehiclesList.Items.Add(honda.name); // sets the order in the string sets up the string


Vehicle honda1 = new Vehicle();
honda1.year = 1991;
honda1.make = "Honda";
honda1.model = "Accord";
honda1.whole = 3500;
honda1.retail = 4350;

string Details = string.Concat(honda1.year," ", honda1.make," ", honda1.model);
honda1.name = Details; Vehicles.Add(honda1);
cboxVehiclesList.Items.Add(honda1.name); //


Vehicle honda2 = new Vehicle();
honda2.year = 1992;
honda2.make = "Honda";
honda2.model = "Accord";
honda2.whole = 4500;
honda2.retail = 5760;

string Detailsr = string.Concat(honda2.year," ", honda2.make," ", honda2.model);
honda2.name = Detailsr; Vehicles.Add(honda2);
cboxVehiclesList.Items.Add(honda2.name);


Vehicle honda3 = new Vehicle();
honda3.year = 1993; //
honda3.make = "Honda";
honda3.model = "Accord";
honda3.whole = 5760;
honda3.retail = 7500;

string Detailsrm = string.Concat(honda3.year," ", honda3.make," ", honda3.model);
honda3.name = Detailsrm; Vehicles.Add(honda3);
cboxVehiclesList.Items.Add(honda3.name);
}

Reply » 



There are no replies to Misc/Message Board. Post a reply.