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
What is the use of errorprovider control?
What are the advantages of an assembly?
Explain about visual basic.net?
Explain the use of option explicit?
What is the feature anonymous type?
Why should you use delegate?
What is visual basic.net culture?
Name and explain some of the exclusive features which are present in vb?
what is difference between web.config and machine.config and where it will be ?
What do you mean by Redim in VB.NET?
What is the differences between dataset.clone and dataset.copy?
Can you please explain the difference between c# and vb.net?
How many ways the function can return values?
What is the difference between custom control and user control?
What is tracing?