ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview,SQL Server,Ajax,jQuery Plugins,jQuery UI,SSRS,XML,HTML,jQuery demos,code snippet examples.

Breaking News

  1. Home
  2. OOPs
  3. Difference between Overloading and Overriding

Difference between Overloading and Overriding

Using overloading and overriding, we can get the concept of polymorphism. Polymorphism means one entity, multiple forms. By using one name, we can perform multiple of actions in multiple place.
Difference between overloading and overriding are given bellow:
Overloading
  1. It is a compile time polymorphism
  2. At the compile time the compiler know which object is assigned for which class
  3. Method name will be same, parameters will be different and its return type may or may not same
  4. Example- operator overloading, function overloading
Overriding
  1. It is a run time polymorphism
  2. At the compile time the compiler didn’t know which object is assigned for which class. Compiler knows it at run time
  3. Method name will be same, parameters will be same and its return type will be same
  4. Example- virtual function

No comments