How do something like that:
Class Car: string Name, int year
Class SUV:Car;
SUV bmw=ToCar(car);
Something like that ??
public object ToObject(Type type, Car car)
{
// here i just wanna take string and int pool
}
I did something like:
List<Car> cars=new List<Car>
SUV suv=new SUV();
cars.Add(suv).
And next I want:
SUV suv=(Suv)cars[0];
But I get an error that this casting is wrong. :/
I want to just recover the SUV.