When you say this:
BaseClass obj = new DerivedClass ()
You DO NOT say, “Create a container to contain this BaseClass, and then insert this larger DerivedClass into it.”
In fact, you are creating a DerivedClass object, and it is being created in a memory space sufficient for the DerivedClass object. The .NET Framework never monitors the fact that this thing is, in particular, DerivedClass, and it never ceases to consider it as such.
However, when you say that you want to use the BaseClass object variable, you simply create a link / pointer to this object that has already been created and selected and defined, and all this, and your pointer is a bit more vague,
It's like this guy, on the other side of the room, is a red-eyed Irish slightly overloaded chicken farmer with bad teeth and a charming personality named Jimmy, but you just refer to him as “that dude.” The fact that you are vaguely describing him , does not change what it is, or any of its details, although your vague description is absolutely accurate.
Mike mooney
source share