Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the Difference between Overriding and overloading?

Answer Posted / dev man

Overloading->
1) Same name, different parameter list or types of parameters.
2) Sub class method can overload a superclass method.
3) Method be different access specifier.
4) It doesn't need inheritance.
5) All method should be in same class.
6) data types can be different.
7) Return type can be different.

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


overriding->
1) Method should be public.
2) It needs inheritance and virtual keyword
3) It needs virtual keyword before it declaration.
4) Method must have same name with same parameter in
different class.
5) It requires non-static method.
6) Method should have same data type.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between value and reference types?

1003


How to send xml file on server using http protocol?

941


Explain how the .net framework performs automatic memory management.

946


What is strong name in .net assembly?

921


Explain how to achieve polymorphism in vb.net?

896


What is the difference between Namespace and Assembly?

1050


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

1073


What are the different types of a stream?

961


What are all the parts of .net framework?

916


What are the advantages of VB.NET?

953


List the types of generations in garbage collector?

850


What is difference between inline and code behind?

976


Write a VB.Net console program to check whether a number is perfect or not.

7700


How to achieve Polymorphism in VB.Net?

1017


Can you please explain the difference between namespace and assembly?

963