What is the Difference between Overriding and overloading?

Answer Posted / yugal

OVERLOADING is the process of declaring the methods having
the same name but diff signatures. Signature means diff
types & number of arguments.
OVERRIDING is the process of overwriting the methods of
base class in Derived Class.

Overriding is the example of run-time polymorphism and
Overloading is the example of compile-time polymorphism.
Overloading

1) Method can have different access specifier.
2) Method can have different return type
3) Method must have same name with different method
signatures.
4) It doesn't need inheritance as method should be in
same class.

Overriding->

1) Method must have same access specifier.
2) Method must have same return type.
3) Method must have same name with same method
signatures.
4) It needs inheritance and virtual keyword before it
declaration.
5) It requires non-static method.

Is This Answer Correct ?    27 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is trace in vb.net?

590


What are the advantages of an assembly?

607


Define serialization in .net?

641


What is late binding and early binding?

558


Tell me how many .net languages can a single .net dll contain?

531






What is the difference between .dll extension and .exe extension files?

615


How to store images in sql server database through vb.net?

507


What is the difference between system.applicationexception class and system.systemexception?

688


Which is the base class for all the classes in .net framework?

571


What are the shared variables?

559


Explain how to store decimal data in .net?

717


What are the various open source tool available for VB.NET?

570


How to send xml file on server using http protocol?

544


List the different types of assembly?

550


What is break mode? What are the options to step through code?

556