What C# feature will you use to keep common behaviors at one place and force clients to implement some others?

Answer: To have common behaviors at one place and force clients to implements others, we should use C# Abstract class and method feature. Abstract class is the class that contains common behaviors/methods and defer implementation of some methods to client’s class in inheritance. Client Read more →

Real time example of sealed class and method in C# Programming

Let’s understand the real-time example and use of sealed class and method in C# programming with real estate Apartments and Flat design with C# source code example. There are two examples provided to demonstrate why we use sealed class in C# program with real Read more →

What is delegates in C# Programming?

Answer: Delegates in C# programming  is a type safe function pointer that points to a function by having a reference to that function. To create a delegate we use “delegate” keyword. For example public delegate int FunctionPointer(int x,int y); Now, “FunctionPointer” is called a Read more →

Real time use of delegates in C# application without Event

Answer includes real time use of delegates in c# application without event used in  software projects. Question: Tell me the real time scenario where you have used delegates in C# application without using event. Answer: You can explain a real time use of delegates Read more →

Can we overload a generic method in C#?

Answer: Yes, we can overload a generic methods in C# as we overload a normal method in a class. Example: using System; using System.Collections.Generic; using System.Linq; using System.Text; class GenericMethodOverloading { //Overloaded generic method with one parameter public void CustomPrint(T value) { Console.WriteLine(“In overloaded Read more →