What is the difference between method overloading and method overriding?

C# OOP Basic Fresher1–2 Yrs Conceptual 1 min read

Quick Answer

Overloading = multiple methods with the same name but different parameters in the same type; the compiler picks one based on the arguments (compile-time / static polymorphism). Overriding = a derived class replacing a virtual base method with the same signature; the runtime picks one based on the actual object (run-time / dynamic polymorphism).

Overloading is when I have several methods with the same name in a type but different parameter lists — the compiler figures out which one to call from the arguments I pass, so it's decided at compile time. Overriding is inheritance: a subclass provides its own implementation of a virtual method from the base class with the exact same signature, and the runtime decides which one runs based on the actual object. Overloading is static polymorphism, overriding is dynamic polymorphism.

OverloadingOverriding
WhereSame class (or via inheritance)Base + derived class
SignatureMust differ (parameters)Must match exactly
Return type aloneNot enough to overloadMust match (or covariant)
KeywordNonevirtual / override
ResolvedCompile timeRun time (vtable)

Overloading is a convenience — Console.WriteLine has ~19 overloads. Overriding is how polymorphism works — a Shape.Area() that each subclass implements.