C# Interview Questions – Level 2 (3 – 6 Yrs)

General Questions

  • What do you mean by a static constructor and why do we use it?
  • What do you mean by a static class? Why do we use a static class?
  • Why do we use nullable type variables?
  • What do you mean by event, delegate, and multicast delegate in C#?
  • Why c# main method is static?
  • What’s the difference between Boxing/Unboxing and Casting?
  • Why do we need a property?
  • Define Events and Delegates in C#? How they are different?
  • What is the difference between Interface and Abstract class? How do you decide which one to use in a particular situation?
  • Explain the difference between Equals and “==”
  • What’s the difference between System.String and System.StringBuilder classes?
  • What is the use of IDisposable interfaces?
  • What is the use of IEnumerable interfaces?
  • What’s the difference between Dictionary and Hashtable?
  • What is the difference between const and read-only variables. Explain with an example.
  • What is the difference between ref and out keywords. Explain with an example.
  • What is the difference an Interface and an Abstract class. How do you decide which one to use when. Explain with an example.
  • What is the difference between Finalize() and Dispose()?
  • What are circular references? Explain how garbage collection deals with circular references.
  • What are generics in C#.NET?
  • Explain how to implement Delegates in C#.NET.
  • What are delegates and why are they required?
  • What is an assembly in .NET?
  • Define abstract class in C#.NET
  • What is serialization in .NET?
  • Is is possible to force garbage collector to run?
  • What is Language Integrated Query (LINQ)?
  • What is GAC (global assembly cache)?
  • How is the DLL Hell problem solved in .NET?
  • What is “var” keyword
  • Lambda expression, meaning and uses
  • ORMs for .NET

Advanced Questions

  • Size of an Empty Class in C#
  • Difference between Boxing and Casting
  • Inheritance vs Composition, when to prefer one over other?

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s