Junior OOP

What is method overloading?

  • Same method name with different parameters in the same class.
  • Enables compile-time polymorphism.

class MathHelper

public int Multiply(int a, int b) => a * b;

public int Multiply(int a, int b, int c) => a * b * c; //

Overloaded

More from C# Programming Tutorial

All questions for this course