Q:

How ToString(), GetHashCode() methods appear for each object in C#

For a class, ClassA, how does the object contain ToString(), GetHashCode(), GetType() methods by default. 
And if ChildClassA is inherited from ClassA, how does GetType() on base and child object gives its own implementation result. 
Is there any magic behind it.

A:

All classes that are not derived from some other explicitly stated class derive from object, that has the three methods you are asking about. And yes, there is some magic behind .GetType(), it is defined as
[Pure]
[ResourceExposure(ResourceScope.None)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern Type GetType();

So the .net runtime has special native code to handle it.

