- Preface i
-
1 The .NET Version History 1
- 1.1 .NET Framework 1.0 | C# 1.0 | Visual Studio 2002 | 2002 1
- 1.2 .NET Framework 1.1 | C# 1.1 | Visual Studio 2003 | 2003 3
- 1.3 .NET Framework 2.0 | C# 2.0 | Visual Studio 2005 | 2005 4
- 1.4 .NET Framework 3.0 | C# 2.0 | Visual Studio 2005 | 2006 6
- 1.5 .NET Framework 3.5 | C# 3.0 | Visual Studio 2008 | 2007 6
- 1.6 .NET Framework 4.0 | C# 4.0 | Visual Studio 2010 | 2010 7
- 1.7 .NET Framework 4.5 | C# 5.0 | Visual Studio 2012 | 2012 9
- 1.8 .NET Framework 4.6 | C# 6.0 | Visual Studio 2015 | 2015 10
- 1.9 .NET Framework 4.7 | C# 7.0 - 7.3 | Visual Studio 2017 | 2017 11
- 1.10 .NET Framework 4.8 | C# 7.3 | Visual Studio 2019 | 2019 14
- 1.11 .NET Core 1.0 | C# 6.0 | Visual Studio 2015 | 2016 14
- 1.12 .NET Core 2.0 | C# 7.0 | Visual Studio 2017 | 2017 14
- 1.13 .NET Core 3.0 | C# 8.0 | Visual Studio 2019 | 2019 15
- 1.14 .NET Core 3.1 (LTS) | C# 8.0 | Visual Studio 2019 | 2019 16
- 1.15 .NET 5 | C# 9.0 | Visual Studio 2019 | 2020 16
- 1.16 .NET 6 (LTS) | C# 10.0 | Visual Studio 2022 | 2021 17
- 1.17 .NET 7 | C# 11.0 | Visual Studio 2022 | 2022 18
- 1.18 .NET 8 | C# 12.0 | Visual Studio 2022 | 2023 20
- 1.19 .NET 9 | C# 13.0 | Visual Studio 2023 | 2024 21
- 1.20 .NET 10 (LTS) | C# 14.0 | Visual Studio 2025 | 2025 22
-
2 Data Structures 24
- 2.1 Arrays in .NET 24
- 2.2 Lists in .NET 30
- 2.3 Dictionaries in .NET 35
- 2.4 Stacks in .NET 42
- 2.5 Queues in .NET 48
- 2.6 HashTables and HashSets in .NET 56
- 2.7 Trees in .NET 68
- 2.8 Graphs in .NET 76
-
3 Algorithms 96
- 3.1 Sorting Algorithms in .NET 96
- 3.2 Search Algorithms in .NET 108
- 3.3 Graph Algorithms in .NET 124
- 3.4 Dynamic Programming in .NET 144
-
4 C# Fundamentals 151
- 4.1 C# Basics 151
- 4.2 Delegates and Parameters 162
- 4.3 Value Types, Reference Types, Immutable, Semantics 170
- 4.4 Types and Type Differences 178
- 4.5 Collections and LINQ 187
-
5 OOP Design and Best Practices 199
- 5.1 Object-Oriented Programming (OOP) 199
- 5.2 SOLID Principles 210
- 5.3 DRY (Don’t Repeat Yourself) 213
- 5.4 Clean Code and Best Practices 214
- 5.5 Incremental Refactor and Code Update Techniques 226
-
6 Design Patterns 237
- 6.1 Creational Patterns 238
- 6.2 Structural Patterns 242
- 6.3 Behavioral Patterns 250
-
7 Memory Management and Performance 266
- 7.1 Stack and Heap Memory 266
- 7.2 Garbage Collection 270
- 7.3 Performance and Optimization 275
-
8 Databases, TSQL and ORMs 280
- 8.1 SQL Server Basics, Schemas, Tables, Views, Jobs, SSRS, SSIS, and System Databases 280
- 8.2 T-SQL (Transact-SQL), Stored Procedures (SProcs), Views, Functions, etc 288
- 8.3 ORM Concepts and Entity Framework 295
- 8.4 LINQ to Entities 302
- 8.5 Advanced Topics in Entity Framework and LINQ 310
-
9 Advanced C# Concepts 317
- 9.1 Advanced C# Language Features 317
- 9.2 Compilation, Managed vs. Unmanaged Code, Intermediate Language (IL), CLR 342
- 9.3 Reflection and Dynamic Code 350
- 9.4 New Features and Enhancements in .NET 358
-
10 System Design and Architecture 367
- 10.1 Low-Level and High-Level System Design 367
- 10.2 Non-Functional Requirements System Design 377
- 10.3 Systems Architecture, Components, Modules, and Layers 385
- 10.4 Architectural Patterns and Message Queues 397
- 10.5 System Architecture: Layered Modular Design with Data, Service, Core, UI, and Common Code Layers 408
-
11 Concurrency and Multithreading 419
- 11.1 Concurrency and Multithreading Basics 419
- 11.2 Thread Management 428
- 11.3 Asynchronous Programming 436
- 11.4 Synchronization Primitives 443
- 11.5 Advanced Concurrency and Multithreading 452
-
12 Testing and Automation 460
- 12.1 .NET Unit Testing, Techniques, Patterns, and Best Practices 460
- 12.2 Practical Unit Test Examples, Code Coverage, and Tools 472
- 12.3 Advanced Test Automation and CI/CD 484
-
13 Web APIs in .NET 492
- 13.1 Web API REST Service Design With .NET Core 492
- 13.2 ASP.NET Web API Routing, Endpoints, Controllers, DI, Model Binding, Validations, and Versioning 500
- 13.3 Caching and Performance in REST Services 510
- 13.4 Web API REST Principles in .NET Core 518
- 13.5 Web API Security, JWT, JSON Tokens, and Authentication 526
- 13.6 ASP.NET Core Web API Middleware 534
-
14 Cloud Infrastructure and DevOps 545
- 14.1 Cloud Computing with Azure and Azure Services 545
- 14.2 Docker and Virtual Machines (Azure, GitLab) 555
- 14.3 Azure Functions 563
- 14.4 CI/CD, Builds, and Pipelines for .NET Apps (Azure, GitLab) 572
-
15 Security in .NET Applications 585
- 15.1 General Code Security and Best Practices in .NET 585
- 15.2 Obfuscation, Data Protection, Authentication, and Authorization 593
- 15.3 Network Security, Preventing Common Security Vulnerabilities 601
- Conclusion 609
The C# and .NET Interview Compendium – Second Edition
Interview Questions and Answers for C# and .NET Developers
A practical, modern interview-preparation compendium for C# and .NET developers (619 manuscript pages).
Minimum price
$19.99
$29.99
You pay
Author earns
Buying multiple copies for your team? See below for a discount!
About
About the Book
**The C# and .NET Interview Compendium – Second Edition** is a large, structured question-and-answer reference built specifically for technical interview preparation in the C# and .NET ecosystem. Rather than teaching the language from scratch, it assumes working professional familiarity with C# and organizes the knowledge an interviewer is likely to probe — from language mechanics through system design — into clear, direct answers that explain not just *what* something is, but *why* it works that way and what the alternatives cost.
The book progresses deliberately across fifteen chapters rather than presenting an unordered topic list. It opens with the evolution of the .NET platform itself, current through .NET 10 and C# 14, and C# language fundamentals in depth. It then builds through the core computer-science material most interviews treat as a baseline — data structures (arrays through graphs, with real traversal and shortest-path algorithms) and algorithms (sorting, searching, and dynamic programming worked in full) — before moving into object-oriented design, SOLID principles, clean-code practice, and a complete catalog of 23 classic design patterns with working C# implementations. The remaining chapters address production-level concerns: memory management and performance, SQL Server/T-SQL and ORM usage, C# and CLR internals, distributed system design and architecture, concurrency and multithreading, testing and test automation, building and securing Web APIs in ASP.NET Core, deploying and operating on Azure, and defending an application against common security vulnerabilities.
Readers should expect a genuinely wide skill-level range within one book: some material revisits fundamentals precisely enough to be useful to a developer who has never had to explain *how* a `Dictionary` works internally, while other sections — advanced graph algorithms, distributed system design, Azure architecture — sit comfortably at senior or staff level. This breadth is intentional: the compendium is meant to serve as one reference across an entire interview-preparation journey, not a single difficulty band. Every major section pairs its explanation with a runnable code example, so the material can be read alongside real code rather than as abstract prose.
The compendium works both as a sequential preparation course and as a standing reference. Read front to back, it functions as a structured, multi-week study path. Used topic by topic, each chapter stands independently, so a reader with an interview focused on system design, Web API security, or a specific data-structure topic can go directly to the relevant chapter. This dual use — study guide and lookup reference — is the book's core practical value: it is meant to be revisited, not read once and shelved.
Team Discounts
Team Discounts
Get a team discount on this book!
Up to 3 members
- Minimum price
- $47.00
- Suggested price
- $72.00
Up to 5 members
- Minimum price
- $76.00
- Suggested price
- $116
Up to 10 members
- Minimum price
- $133
- Suggested price
- $203
Up to 15 members
- Minimum price
- $190
- Suggested price
- $290
Up to 25 members
- Minimum price
- $285
- Suggested price
- $435
Author
About the Author
Yohan is a Senior Full-Stack Software Engineer with extensive experience delivering scalable, end-to-end software solutions across web, enterprise, and cloud-based environments. He specializes in architecting robust platforms, modernizing legacy systems, driving cloud transformation efforts, and building integration-heavy applications that support critical business workflows. He is recognized for translating complex requirements into reliable, maintainable, and high-value solutions across industries such as insurance, cybersecurity, and professional services.
Known for combining strong technical execution with a practical business mindset, he has contributed to projects from concept and design through production delivery and long-term support. His experience includes collaborating with cross-functional teams, improving development workflows, solving complex technical challenges, and helping organizations deliver dependable software products that adapt to changing business needs. He brings a balanced approach to engineering that values quality, efficiency, and continuous improvement.
Contents
Table of Contents
Get the free sample chapters
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.