C# Interview Questions & Answers

Showing 10 of 62 questions | Page 3

Technical interview questions and answers help you perform well in any C# Interview because companies test your understanding of .NET concepts, OOPs, collections, delegates, LINQ, and error handling. C# is widely used in enterprise applications, making it a key skill for software development roles. Companies like TCS, Wipro, Infosys, Cognizant, and Capgemini frequently ask core C# questions to evaluate your coding skills and understanding of the .NET ecosystem. This guide includes commonly asked C# interview questions with detailed explanations to help freshers and job seekers strengthen their technical foundation. These questions will support your preparation for coding rounds, technical interviews, and project-related discussions.

C# developers can expand their Microsoft technology stack by learning .NET framework  architecture and Windows programming  techniques 

Showing 10 of 62 questions

21. If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor?

Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.

22. Is XML case-sensitive?

Yes, so and are different elements.

23. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?

SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix, but it

24. What are the ways to deploy an assembly?

An MSI installer, a CAB archive, and XCOPY command.

25. What are three test cases you should go through in unit testing?

Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).

26. What connections does Microsoft SQL Server support?

Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords).

27. What debugging tools come with the .NET SDK?

CorDBG

28. What does assert() do?

In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.

29. What does Dispose method do with the connection object?

Deletes it from the memory.

30. What does the keyword virtual mean in the method definition?

The method can be over-ridden.
Questions and Answers for Competitive Exams Various Entrance Test