C# Exercise – On Constructor with Solution

C# exercises on constructor with solutions. EXERCISE-1: Answer the following questions in brief. When a class constructor gets called? If you create 5 objects of a class, then how many time constructors will be called? When you write a constructor, what return type do you write in constructor declaration? Why do you use constructor? EXERCISE-2: … Read more C# Exercise – On Constructor with Solution

Interface-Abstract class – C# Programming Interview Questions

This section contains real OOP C# programming interview questions and answers on C# interfaces and abstract class asked in C# technical interviews to IT professionals. Answers to questions are provide with example and explanation. Also, these technical job interview questions and answers will boost the concept on C# Interface and Abstract class programming. Topic – … Read more Interface-Abstract class – C# Programming Interview Questions

Constructor and Destructor – C# Programming Questions – Real

This section contains technical C# programming interview questions on constructor and destructor with answers and explanation asked in technical interviews for freshers and experienced. Topic – Constructor and Destructor, Static Constructor in C#, Private constructors etc. Q- What is output of the following program? When we create 2 objects of the class A e.g. A … Read more Constructor and Destructor – C# Programming Questions – Real

Functions – C# Programming Interview Questions – Real

Only Real C# programming interview questions with answers for freshers and experienced asked in Technical interviews. Q – Does below code compile? If not, what is the issue?   class A { public void Y(out int val) { Console.WriteLine(“Value:”+val); val = 10; Console.WriteLine(“Value assigned:”+val); } } class Program { static void Main(string[] args) { A … Read more Functions – C# Programming Interview Questions – Real

Polymorphism – C# Programming interview Questions

C# programming interview questions and answers on polymorphism with explanation asked in technical job interview for freshers and experienced. Topic –  Polymorphism – Method Overloading, Method Overriding and Operator Overloading, virtual. Q – If we call the below statements in main (), what is the wings’ colour of Parrot? Give reason. Bird b = new … Read more Polymorphism – C# Programming interview Questions

Exception, Try, Catch – C# Programming Questions

C# tricky and conceptual programming questions and answers with explanation asked in technical interviews. Topic – Exception handling, Try, Catch and Throw. Q- What is return value of the function foo()? class xyz { public int foo() { try { return 5; } finally { } return 20; } }   Answer: The foo() function … Read more Exception, Try, Catch – C# Programming Questions