Why the ultimate base class of all classes in the .NET Framework called System.Object? It must be called System.Class or something because this is class not the class instance (object).
Why the ultimate base class of all classes in the .NET Framework called System.Object?
Share
It’s called
System.Objectbecause every object is an object. For example, an instance ofStringis anObject– but aStringisn’t a class, is it? The string class is a class, but that’s a different matter.There’s
System.Typeto represent types, so an instance ofSystem.Typeknows what properties, methods etc the type has. So you can use something like:But it wouldn’t be appropriate to be able to call
GetProperties,GetMethodsetc on a string itself – because a string is just a sequence of characters.