Everything inherits from object. It\'s the basis of inheritance. Everything can be implicitly cast up the inheritance tree, ie.
object me = new Person();
At first glance, this does not make intuitive sense. But it does. Look at this code:
List people = new List();
List
Now we suddenly have a List
of Person
objects... with a Mouse
inside it!
This explains why the assignment of an object of type A
to a variable of type A
is not allowed, even if S
is a supertype of T
.