Junior — Middle
What are the main methods available in the base class Object in your programming language?
sobes.tech AI
Answer from AI
In C#, the base class Object provides several key methods available to any object:
ToString()— returns a string representation of the object.Equals(object obj)— determines whether the current object is equal to another.GetHashCode()— returns the hash code of the object, used in collections.GetType()— returns the runtime type of the object.MemberwiseClone()— a protected method that creates a shallow copy of the object.Finalize()— called by the garbage collector before the object is destroyed (usually not called directly).
These methods can be overridden to change the behavior of objects in your classes.