Closed muhammadbaneshi closed 9 years ago
Because The ToString() Method has existed in object class(which every datatypes and classes have inherited from that) as a virtual method, so if you want to change or use the method in your class (like Shape class for example) you have to use it as an override method because as I said every Classes in C# inherit from object class, and actually all of them are object, so that's why we call C# Object Oriented.
I do not understand. ToString() method in first time is override. Not exist before.
It exists in 'object' class which is inaccessible to you but you can use object as a datatype or use it for boxing and unboxing.
in line 44 Why not write public virtual string ToString () what is the story?