C# Interview Questions
C# Interview Questions
===========================================================================
What is C#?
Explain the basic structure of a C# program.
What are the main features of C#?
What is the difference between public, private, protected, and internal access
specifiers?
What is a namespace in C#?
What is a class and an object in C#?
What is the difference between a class and a struct?
What is inheritance?
What is polymorphism?
What are interfaces in C#?
===========================================================================
Intermediate Questions
===========================================================================
What are delegates and how are they used?
Explain the concept of events in C#.
What is the difference between abstract class and interface?
What are generics in C#?
What is the difference between Array and ArrayList?
What is the use of the using statement?
What are properties in C#?
Explain LINQ and its benefits.
What is a Nullable type?
Explain the concept of async and await in C#.
===========================================================================
Advanced Questions
===========================================================================
What are extension methods in C#?
What is Reflection in C#?
What is dependency injection?
Explain the Solid Principles in C#.
What is the purpose of the lock statement in C#?
What is Garbage Collection and how does it work in C#?
Explain Multithreading and how it is implemented in C#.
What is Parallel Programming in C#?
What is the difference between Task and Thread in C#?
What are asynchronous streams in C#?
===========================================================================
Practical/Code Questions
===========================================================================
Write a program to reverse a string in C#.
Implement a singleton pattern in C#.
Write a method to check if a given number is a prime number.
Implement a basic calculator using delegates.
Write a program to demonstrate the use of LINQ to filter a collection.
Create a simple CRUD application using Entity Framework.
Write a method to find the largest and smallest elements in an array.
Implement an event handler in C#.
Create a multithreaded application that demonstrates the use of lock.