What is the Difference between Overriding and overloading?

Answer Posted / prachee

overloading has same method but different types of
parameters, number of parameters.

overloading does not take return type to differentiate
overloaded method.

ex:
int add(int a, int b)
int add(float a , float b)
are overloaded methods

overriding comes with inheritance concept.
here parent and child both contains the same method. and
when execution takes place; child's method is called.

Is This Answer Correct ?    124 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why should you use delegate?

661


What do you understand by vb.net?

811


What is the use of errorprovider control?

765


How to execute VB.NET PROJECTS,VB6.0 PROJECTS AND write their test cases.Need Reply Urgently

2242


Define clr?

727


I Am Developing A project where I can send Message from One Computer to Another Computer With The Help Of LAN.Already I Have developed..It is working Fine With The Details Of ..TO,FROM,REF No,DATE,BODY...Now I Want To Add Attachments part in the same projects...How Can I Send Attachment File & How To Send It..I Am Working in VB.Net 2005 With out Any database. Can Any One Help me ??How To Write Code??Plz Send me a copy to my Mail also...I Dont Need Any Software Available in The Internet...Plz refer me The Code in VB.Net maloy.adhikari@in.com

2398


Explain the services provided by common language infrastructure.

923


Explain how to store decimal data in .net?

914


What are the different variables in vb.net?

701


how to get dynamic control array position or its index position?

2232


What is the difference between custom control and user control?

744


How do you retrieve the customized properties of a .net application from xml .config file?

720


Explain how the .net framework performs automatic memory management.

760


How would you implement inheritance using vb.net?

699


What is the advantages of VB.NET?

794