Answer Posted / preetham
Overloading :
If you want to use same method in a different ways by using different method signatures.It should be in the same class.
In the below example there is no parameter passed in first time calling but same method we used with passing multiple parameters. This is what overloading means.
Ex: public void FirstMethod(){}
public void FirstMethod(int i, string s){}
Overriding :
It deals with two methods one in a parent class and one in a child class that have the same signature.
The method in parent class should be declared as virtual and the method in the derived class should be declared as override in their method signature. Every virtual method in the parent class should be override in the derived class.
Ex : public virtual void FirstMethod(){}
public override void FirstMethod(){}
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
question related to table havi colspan and row span
What is the access level of the visibility type internal?
how we can fire event in databound column in datagrid without using button?
What's new in the .net 2.0 class library?
What are the different pipelining hazards? : Dot net architecture
How is the using() pattern useful? What is idisposable?
Explain Singleton design pattern in .net
The maximum report processing jobs limit configured by your system administrator has been reached.How I can Solve this problem when i using crystal report to load from my application.
Explain write back and write through caches? : .NET Architecture
how to add list of items in a web application and win application?
What is .net mobile images control. Explain with an example? : Microsoft dot net mobile
HttpHendler and HttpModules
what is the method while we are using adapter and dataset ?
how to change row background color in gridview
Explain how to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile