Possible Duplicate:
Try to describe polymorphism as easy as you can
I have trouble understanding what exactly polymorphism is? And for example how would this code use polymorphism
I have a car class and a method inside that called countprice and i also have a jeep class that inherits from the car class.
List<Car> carlist = new List<Car>();
Jeep jeepABC123 = new Jeep(800, 14, 20, 10, 3500);
carlist.Add(jeepABC123);
Sedan sedanGHA321 = new Sedan(600, 7, 20, 10);
carlist.Add(sedanGHA321)
// This code
foreach (Bil bil in carlist)
{
revenue = revenue + car.countprice();
}