General C# Questions

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

C# OOP

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