C# (.NET) Interview: 200 Questions and Answers
C# (.NET) Interview: 200 Questions and Answers
Summary:
The book "C# (.NET) Interview: 200 Questions and Answers" is a practical guide for developers preparing for a technical interview for Junior and Middle C#/.NET developer positions. Instead of scattered articles and chaotic cheat sheets, you get a structured collection of real questions most frequently asked in interviews at Russian and international IT companies.
The book is built on the "question-answer" principle and covers all key topics of the .NET ecosystem:
- C# and .NET Basics: data types, Boxing/Unboxing, memory management, Garbage Collector, stack and heap.
- Object-Oriented Programming (OOP): encapsulation, inheritance, polymorphism, abstract classes, interfaces, SOLID.
- LINQ and Collections: deferred execution, difference between IEnumerable and IQueryable, Select, Where, GroupBy, Join methods.
- Asynchronous Programming: async/await, Task, ValueTask, SynchronizationContext, asynchronous streams, deadlock issues.
- Multithreading and Parallelism: Thread, ThreadPool, Task Parallel Library (TPL), locks, lock, Monitor, Semaphore, Concurrent collections.
- ASP.NET Core and Web API: Middleware, Dependency Injection, service lifetimes (Singleton, Scoped, Transient), filters, attributes, Swagger.
- Entity Framework Core: Code First, migrations, Lazy Loading vs Eager Loading, N+1 problem, relationship configuration, query performance.
- Testing and Debugging: Unit tests, Moq, xUnit, NUnit, TDD, mocks and stubs.
- Design Patterns: Singleton, Factory, Repository, Unit of Work, Strategy, Observer — with examples in C#.
Who this book is for:
- Junior developers who want to systematize their knowledge and confidently pass their first interview.
- Middle developers seeking to deepen their understanding of .NET architecture and prepare for a promotion.
- Students and course graduates planning to enter IT through C# and .NET.
What you will learn after reading:
- How to answer tricky questions about the Garbage Collector and memory management.
- How async/await differs from classic multithreading and when to use which.
- How to properly design a Web API architecture considering Dependency Injection and Middleware.
- Which design patterns are actually needed in everyday development.
- How to avoid common interview mistakes (N+1, deadlock, race condition).
The book is written in simple language, contains code examples and explanations of "why this way and not another." It is not dry theory, but a lively dialogue with the reader, where each answer can be immediately applied in practice.
Note: the book is oriented towards .NET 6/7/8, but most concepts are applicable to older versions as well.
Recommendations
Web Development in C# (.NET): From Basics to Deployment
PHP and Databases: A Practical Guide
Asynchronous Swift (iOS/macOS): The Complete Guide
Design Patterns in C# (.NET). A Modern Approach
GraphQL on Swift: The Complete Guide to Building APIs for iOS and macOS
Mobile Platform Development with Kotlin Multiplatform