The list of Potential Questions that may be asked during the interview for C# Developer Position.

This is a list of questions I have gathered from other sources and created myself over a period of time from my experience, many of which I felt where incomplete or simply wrong.  I have finally taken the time to go through each question and correct them to the best of my ability.  However, please feel free to post feedback to challenge, improve, or suggest new questions.  I want to thank those of you that have contributed quality questions and corrections thus far.

There are some questions in this list that I do not consider to be good questions for an interview.  However, they do exist on other lists available on the Internet so I felt compelled to keep them easy access.

General Questions

  1. Does C# support multiple-inheritance?
  2. Who is a protected class-level variable available to?
  3. Are private class-level variables inherited?
  4. Describe the accessibility modifier “protected internal”.
  5. What’s the top .NET class that everything is derived from?
  6. What does the term immutable mean?
  7. What’s the difference between System.String and System.Text.StringBuilder classes?
  8. What’s the advantage of using System.Text.StringBuilder over System.String?
  9. Can you store multiple data types in System.Array?
  10. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
  11. How can you sort the elements of the array in descending order?
  12. What’s the .NET collection class that allows an element to be accessed using a unique key?
  13. What class is underneath the SortedList class?
  14. Will the finally block get executed if an exception has not occurred?
  15. What’s the C# syntax to catch any possible exception?
  16. Can multiple catch blocks be executed for a single try statement?
  17. Explain the three services model commonly know as a three-tier application

Class Questions

  1. What is the syntax to inherit from a class in C#?
  2. Can you prevent your class from being inherited by another class?
  3. Can you allow a class to be inherited, but prevent the method from being over-ridden?
  4. What’s an abstract class?
  5. When do you absolutely have to declare a class as abstract?
  6. What is an interface class?
  7. Why can’t you specify the accessibility modifier for methods inside the interface?
  8. Can you inherit multiple interfaces?
  9. What happens if you inherit multiple interfaces and they have conflicting method names?
  10. What’s the difference between an interface and abstract class?
  11. What is the difference between a Struct and a Class?

Method and Property Questions

  1. What’s the implicit name of the parameter that gets passed into the set method/property of a class?
  2. What does the keyword “virtual” declare for a method or property?
  3. How is method overriding different from method overloading?
  4. Can you declare an override method to be static if the original method is not static?
  5. What are the different ways a method can be overloaded?
  6. If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?

Events and Delegates

  1. What’s a delegate?
  2. What’s a multicast delegate?

XML Documentation Questions

  1. Is XML case-sensitive?
  2. What’s the difference between // comments, /* */ comments and /// comments?
  3. How do you generate documentation from the C# file commented properly with a command-line compiler?

Debugging and Testing Questions

  1. What debugging tools come with the .NET SDK?
  2. What does assert() method do?
  3. What’s the difference between the Debug class and Trace class?
  4. Why are there five tracing levels in System.Diagnostics.TraceSwitcher?
  5. Where is the output of TextWriterTraceListener redirected?
  6. How do you debug an ASP.NET Web application?
  7. What are three test cases you should go through in unit testing?
  8. Can you change the value of a variable while debugging a C# application?

ADO.NET and Database Questions

  1. What is the role of the DataReader class in ADO.NET connections?
  2. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?
  3. What is the wildcard character in SQL?
  4. Explain ACID rule of thumb for transactions.
  5. What connections does Microsoft SQL Server support?
  6. Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted?
  7. What does the Initial Catalog parameter define in the connection string?
  8. What does the Dispose method do with the connection object?
  9. What is a pre-requisite for connection pooling?

Assembly Questions

  1. How is the DLL Hell problem solved in .NET?
  2. What are the ways to deploy an assembly?
  3. What is a satellite assembly?
  4. What namespaces are necessary to create a localized application?
  5. What is the smallest unit of execution in .NET?
  6. When should you call the garbage collector in .NET?
  7. How do you convert a value-type to a reference-type?
  8. What happens in memory when you Box and Unbox a value-type?