Quote:
what makes the obj2 special over obj1?
Nothing.
In fact you can do this:
BaseClass obj1 = new BaseClass();
BaseClass obj2 = new ChildClass();
obj1 = obj2;
What's happening is
inheritance - ChildClass inherits from BaseClass, so it is "Base class with extras" - every instance is both a ChildClass instance and a BaseClass instance at the same time.
Think about cars for a moment: You can drive a Car. Which means you can drive a Ford, and a Mercedes; and further you can drive a Ford Fiesta, and a Ford Focus, and a Mercedes A Class, and a Bugatti Veyron - you don't have to take a new test for each manufacturer or each model.
"Focus" inherits from "Ford", which inherits from "Car"
"A Class" inherits from "Mercedes", which inherits from "Car".
So anything that a Car can do (StartTheEngine, DriveToTheShops) any Ford can do, and any Focus or Fiesta can also do.
Back to computers, and it's the same thing: You have a base class and all derived classes can do everything that the base can. When you use the variable, it's type determines what the compiler will let you do:
BaseClass obj1 = new BaseClass();
BaseClass obj2 = new ChildClass();
obj1.BaseClassMethod();
obj2.BaseClassMethod();
All perfectly fine.
But it won't let you use ChildClass specific items:
obj1.ChildClassMethod();
obj2.ChildClassMethod();
Both will give you a compiler error because obj1 and obj2 are both capable of holding a BaseClass which doesn't mean that what they hold will be a ChildClass instance.
Does that make any sense?