Skill Zuno · skillzunos.com · Fullstack
C # interview questions
Prepare for C # interviews on Skill Zuno. This practice book covers C # interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.
Open C # on Skill ZunoAlso see the C # tutorial.
C# is a statically typed, object-oriented language from Microsoft that runs on .NET. It combines classes and interfaces with modern features such as LINQ, async/await, pattern matching and records. C# interviews cover value and reference types, memory management, LINQ, delegates and asynchronous code.
Sample C # interview questions
What is the difference between a struct and a class?
A struct is a value type: it is copied on assignment and usually lives inline on the stack or inside another object. A class is a reference type on the heap, and variables hold references to it. Structs suit small immutable values.
What is deferred execution in LINQ?
Most LINQ operators build a query instead of running it. The query runs when it is enumerated, with foreach, ToList() or Count(), so enumerating twice runs it twice and sees any changes to the source.
What is the difference between IEnumerable and IQueryable?
IEnumerable runs queries in memory with delegates. IQueryable builds expression trees that a provider such as Entity Framework translates to SQL, so filtering happens in the database.
Why should you avoid .Result and .Wait() on a Task?
Blocking on a task can deadlock when the awaited code needs to resume on the same captured synchronization context, as in classic ASP.NET or UI apps. It also wastes a thread. Use await all the way up.
What does the using statement do?
using calls Dispose() on an IDisposable object when the block ends, even if an exception is thrown. It releases unmanaged resources such as file handles and database connections deterministically.
What you can practice
- C # interview questions for beginners and experienced developers
- Level-based practice: New, Easy, Medium, Hard, and Diff
- Fullstack topics alongside C # on skillzunos.com