.Net Interview Questions and Answers

Search:

C#/.NET interview questions: - What is operator overloading? Mention differences between overloading and overriding?

By : Shiv Prasad Koirala | Apr 3rd, 2014 | Views : 4676 | Comments : 0 Bookmark and Share

Operator overloading is a concept of polymorphism where you can redefine operators like +, - , * etc with additional functionalities.


For instance we can redefine the + functionalities to add objects like obj1 + obj2. Below is simple code snippet which redefines + operator.




You can now use the + operator to add objects of type some class as shown in the below code snippet.




Differences between overloading and overriding


Overloading

Overriding

Overloading is a concept where we can have same method names with different input signature.

In overriding we have a parent class with virtual functions which are overridden in the child classes.


Also see the following .NET interview questions video on operator overloading in C# (Csharp): -


 
Rate this Article :
1 Star
2 Stars
3 Stars
4 Stars
5 Stars
1 1 1 2 1
 
 
 
 

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

Article Categories

Learn in Hindi