Infolink

 

Search This Blog

Showing posts with label real world concept. Show all posts
Showing posts with label real world concept. Show all posts

Feb 22, 2014

Overloading and Overriding in C# with real world example

In my early day career in many interviews I asked same question, what is overloading and overriding so decided to write this small article which may help someone. We will see here in detail about the overloading, overriding and then differences between them.

Overloading: is the mechanism to have more than one method with same name but with different signature (parameters). A method can be overloaded on the basis of following properties

  1.     Have different number of parameter
  2.     Having same number of parameters but of different type
  3.     Having same number and type of parameters but in different orders

Related Posts Plugin for WordPress, Blogger...