freshers/Experienced Dotnet jobs

06/07/2011

Polymorphism

OverLoading and OverRiding are both examples of Polymorphism.

  • OverRiding is Dynamic Polymorphism(executed at runtime)
  • OverLoading is Static Polymorphism(executed at compile time)
OVERRIDING --  for eg. Consider class A containing  method abc and class B inheritng class A can override method abc to give a different functionality.

OVERLOADING --  Its a mechanism in which we can have 2 or more methods with same name.Thinking how,its possible using different parameter datatypes or different number of parameters or different order of parameters.


No comments:

Post a Comment