It is said that in the book that:
"Every class you create in C# derives from a single class named System.Object. In other words, the object (or Object) class type in the System namespace is the ultimate base class for all other types."
My question is when we create a class we can select a class name randomly so that how can it be considered derives from a single class named System.Object.
Loading
Sam HobbsPosted Feb 11, 2012, 7:12 AM
{{}}Posted Feb 10, 2012, 3:54 PM
VulpesPosted Feb 10, 2012, 11:30 AM
Because all types inherit from System.Object, this means that they inherit methods such as Equals, GetHashCode, GetType, ToString and MemberwiseClone. Some of these are virtual and so can be overridden in the derived class.