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 option strict?
Explain about rapid application development tool?
What do you mean by option strict on?
What is the difference between system.applicationexception class and system.systemexception?
What is enumerator?
What is an application domain? how they get created?
Define clr?
Explain enumerator?
What are the differences between server-side and client-side code?
Explain about Visual basic.NET culture?
Explain how to send xml file on server using http protocol?
What is late binding and early binding?
Explain the difference between .dll extension and .exe extension files?
What is late binding?
Why do you need Lock in Visual Basic?