tobias wright

software engineer

< Home

Overloading in C#

2021-10-01

I’ve just started learning C# using .net. Since my background is javascript, I knew nothing about overloading. Wikipedia defines method overloading as:

the ability to create multiple functions of the same name with different implementations

This was pretty much a gamer changer for me.

I can not recall the number of times when creating a function, that with one little addition (say, printing a string instead of a number), I’d either have to check in the function, or worst yet, do a switch statement on a function that was the exact same except for some parameter check.

Thank you overloading. I can’t wait to use you for real.