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
Explain about branching logic control in vb.net?
Described strong typing
Name a feature which is common to all .net languages?
What is the advantage of using system.text.stringbuilder over system.string?
Tell me which namespace are used for accessing the data?
what is the advantage of option strict on?
Explain namespace?
what's ArrayList in .Net (VB.Net or C#).What's the advantageous using ArrayList.
What do you mean by serialization and deserialization?
What is late binding and early binding?
What is the diff between vb mdi form and .net mdi form?
What do you understand by vb.net?
Can you please explain the difference between thread and process?
Which dll is used for microsoft .net run time?
What is the feature anonymous type?