📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

πŸ“š .NET Interview Questions

377 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.

Phase 0 — Developer Tooling Foundation

The tools professional .NET engineers use every day: IDEs, debuggers, the .NET CLI, the SDK-style project system and MSBuild. Targets .NET 10 LTS.

  1. What are the main IDEs and editors for .NET development, and how do Visual Studio, Visual Studio Code and JetBrains Rider differ?

    Compares Visual Studio, VS Code with C# Dev Kit and JetBrains Rider for .NET 10 work: platforms, language engines, debugging, licensing and when to choose each.

    Beginner Theory IDEs and Editors Β· πŸ”— 2 follow-ups
  2. How do you set up Visual Studio Code for C# and .NET development, and what do the C# extension and C# Dev Kit each provide?

    Setting up VS Code for .NET 10: the SDK, the C# extension's Roslyn language server and debugger, C# Dev Kit's Solution Explorer and Test Explorer, launch configuration and licensing.

    Junior Theory IDEs and Editors Β· πŸ”— 2 follow-ups
  3. Which Visual Studio edition and workloads does a .NET 10 team need, and how do you keep everyone's installation consistent?

    Visual Studio 2026 editions (Community, Professional, Enterprise), workloads and components, and using a .vsconfig file to give every developer the same installation.

    Junior Theory IDEs and Editors Β· πŸ”— 2 follow-ups
  4. The IDE shows red squiggles and IntelliSense errors, but `dotnet build` succeeds. How do you diagnose and fix it?

    Diagnosing mismatches between IDE diagnostics and the real build: design-time builds, SDK resolution and global.json, stale caches, restore problems, source generators and multi-targeting.

    Mid-Level Debugging IDEs and Editors Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  5. How do you use .editorconfig to keep C# code style consistent across Visual Studio, VS Code and Rider, and enforce it in the build?

    Using a hierarchical .editorconfig for formatting, code style and analyser severities that every IDE honours, and enforcing it with EnforceCodeStyleInBuild and dotnet format in CI.

    Intermediate Theory IDEs and Editors Β· πŸ”— 2 follow-ups
  6. What does JetBrains Rider offer a .NET team compared with Visual Studio, and what are the trade-offs?

    JetBrains Rider for .NET 10: its ReSharper and IntelliJ architecture, refactoring and inspections, shared settings layers, built-in tools, licensing, and where Visual Studio still leads.

    Mid-Level Theory IDEs and Editors Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  7. Your team uses Visual Studio, VS Code and Rider across Windows, macOS and Linux. How do you standardise the developer environment so builds and behaviour match CI?

    A senior plan for a reproducible multi-IDE, multi-OS .NET 10 environment: CLI and CI as the source of truth, global.json, .editorconfig, Directory.Build.props, shared IDE files, Dev Containers and secrets hygiene.

    Senior RealWorldScenario IDEs and Editors Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  8. Review this launchSettings.json. What does the file do, which tools use it, and what would you change?

    A code review of an ASP.NET Core launchSettings.json: how launch profiles are used by Visual Studio, Rider, VS Code and dotnet run, and fixing committed secrets, the wrong environment and unsafe URLs.

    Intermediate CodeReview IDEs and Editors Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  9. What is .NET Hot Reload, how does it work under the hood, and when does it fall back to a restart?

    Hot Reload in Visual Studio, Rider, VS Code and dotnet watch: Roslyn deltas applied through the runtime's metadata update API, Edit and Continue, rude edits, cache invalidation with MetadataUpdateHandler, and limits.

    Mid-Level Theory IDEs and Editors Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  10. What is a breakpoint, and how do you step through .NET code with Step Into, Step Over and Step Out?

    The basics of interactive debugging in Visual Studio, VS Code and Rider: setting breakpoints, stepping commands, Run to Cursor and Set Next Statement, and why Debug builds and symbols matter.

    Beginner Theory Debugging Tools Β· πŸ”— 2 follow-ups
  11. What are conditional breakpoints, hit counts, filters, tracepoints and data breakpoints, and when do you use each?

    Advanced breakpoint types in Visual Studio, VS Code and Rider: conditions, hit counts, filters, tracepoints/logpoints, function, dependent, temporary and data breakpoints, with their performance cost.

    Junior Theory Debugging Tools Β· πŸ”— 2 follow-ups
  12. How do you use the Watch, Locals, Autos and Immediate windows to inspect and change state while debugging, and what are the risks of evaluating expressions?

    Inspecting and changing state at a breakpoint with Locals, Autos, Watch, QuickWatch, DataTips and the Immediate window (Debug Console in VS Code), format specifiers, Object IDs, and the side effects of function evaluation.

    Intermediate Theory Debugging Tools Β· πŸ”— 2 follow-ups
  13. What does the Call Stack window show, how do you use it to work out how code reached a point, and how does it handle async code?

    Reading the debugger's Call Stack: frames, switching context, Just My Code and external code, async logical stacks and Parallel Stacks, inlining, and exception stack traces (throw vs throw ex).

    Intermediate Theory Debugging Tools Β· πŸ”— 2 follow-ups
  14. A .NET service hangs under load. How do you find a deadlock using the Threads window and Parallel Stacks?

    Diagnosing a deadlock with Break All, the Threads window, Parallel Stacks and Parallel Watch, then confirming it in production with dotnet-dump, and fixing it with consistent lock ordering or async-friendly design.

    Mid-Level Debugging Debugging Tools Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  15. What is the debugger's Memory window, when is it useful in .NET, and how is it different from memory profiling tools?

    Using the Visual Studio Memory window to read raw bytes for buffers, interop structs, encodings and unsafe code, and contrasting it with heap snapshots, allocation tracking and dotnet-gcdump for memory leaks.

    Mid-Level Theory Debugging Tools Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  16. An API endpoint is slow. How do you use the Visual Studio Performance Profiler, dotnet-counters and dotnet-trace to find and fix the cause?

    A measured approach to a slow ASP.NET Core endpoint: confirming with Application Insights, profiling CPU, allocations, database and async behaviour in the Visual Studio Performance Profiler, and dotnet-counters and dotnet-trace in production.

    Senior RealWorldScenario Debugging Tools Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  17. What are Just My Code, symbols (PDB files) and Source Link, and how do you step into framework or NuGet package code?

    How the debugger finds source for code you did not write: portable PDBs, symbol servers and .snupkg packages, Just My Code, Source Link and embedded sources, with settings for Visual Studio, VS Code and Rider.

    Junior Theory Debugging Tools Β· πŸ”— 2 follow-ups
  18. A problem only happens in production and you cannot attach a debugger. How do you capture and analyse a memory dump of a .NET process?

    Production diagnosis with dumps: when to take one, capturing with dotnet-dump, createdump settings, App Service and Kubernetes options, analysing in dotnet-dump or Visual Studio, and handling dumps as sensitive data.

    Senior Debugging Debugging Tools Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  19. Review this class's debugging attributes. How do DebuggerDisplay, DebuggerBrowsable, DebuggerTypeProxy and DebuggerStepThrough help, and what would you change?

    A code review of debugger customisation in C#: cheap, side-effect-free DebuggerDisplay, hiding noise with DebuggerBrowsable, collection proxies, step-through attributes, and removing leftover Debugger calls and personal data from debug views.

    Intermediate CodeReview Debugging Tools Β· πŸ”— 2 follow-ups
  20. What is the .NET CLI, and what do dotnet new, dotnet build, dotnet run and dotnet clean do?

    The dotnet driver and its everyday commands: creating projects and solutions from templates, building, running and cleaning, and how the CLI relates to the SDK, MSBuild and the IDEs.

    Beginner Theory .NET CLI Β· πŸ”— 2 follow-ups

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me