R
RajkiranPro
well i have the following classes
class Car
{
//some piece of code
}
class Benz : Car
{
//some piece of code
}
class Porsche : Car
{
//some piece of code
}
public class Cars : List<Car>
{
//some piece of code
}
now in the object of the class Cars i can add objects of classes Benz
And Porsche... However when accessing the objects in the list how can
i identify whether they Belong to Benz or Porsche..
Please Help Me
Thanks In Advance
Rajkiran
class Car
{
//some piece of code
}
class Benz : Car
{
//some piece of code
}
class Porsche : Car
{
//some piece of code
}
public class Cars : List<Car>
{
//some piece of code
}
now in the object of the class Cars i can add objects of classes Benz
And Porsche... However when accessing the objects in the list how can
i identify whether they Belong to Benz or Porsche..
Please Help Me
Thanks In Advance
Rajkiran