0
Why object type can contain any type of data.....???
Why object type can contain any type of data.....???
1 Respuesta
+ 1
The object class holds a central place in the .NET framework. It is the base class for each and every class in both the code you write and the .NET framework itself.
From the MSDN entry for System.Object (https://msdn.microsoft.com/en-us/library/system.object(v=vs.110).aspx):
"
Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all classes in the .NET Framework; it is the root of the type hierarchy.
Languages typically do not require a class to declare inheritance from Object because the inheritance is implicit.
Because all classes in the .NET Framework are derived from Object, every method defined in the Object class is available in all objects in the system. Derived classes can and do override some of these methods.
"