.NET Architecture – Why All Classes Inherit from Object

Architecturenet

Its very interesting for me which advantages gives "global root class" approach for framework.
In simple words what reasons resulted the .NET framework was designed to have one root object class with general functionality suitable for all classes.

Nowadays we are designing new framework for internal use (the framework under SAP platform) and we all divided into two camps – first who thinks that framework should have global root, and the second – who thinks opposite.

I am at "global root" camp. And my reasons what such approach would yields good flexibility and development costs reduction cause we will not develop general functionality any more.

So, I'm very interested to know what reasons really push .NET architects to design framework in such way.

Best Answer

The most pressing cause for Object is containers (prior to generics) which could contain anything instead of having to go C-style "Write it again for everything you need". Of course, arguably, the idea that everything should inherit from a specific class and then abusing this fact to utterly lose every speck of type safety is so terrible that it should have been a giant warning light on shipping the language without generics, and also means that Object is thoroughly redundant for new code.