skip to content

.NET

The cross-platform .NET runtime under C# services: the CLR and JIT, garbage collection, the thread pool, core library services and hosting. Interviewers check what runs below the framework.

on this pageshow

explore

questions

page 2 of 2

As lead of a .NET 10 platform team, would you move a command-line deployment tool and a long-running pricing service to Native AOT, ReadyToRun or plain JIT, and why?

level: principalimportance: should knowfreq 35%

basics

~20 s

Decide per workload: the short-lived deployment tool suits Native AOT if its dependencies are AOT-clean, else ReadyToRun; the pricing service usually stays on the JIT, with ReadyToRun for cold starts, since tiered JIT with dynamic PGO usually wins at steady state.

open as a page

As a lead, which GC settings would you standardise for a fleet of .NET 10 services in memory-limited containers, and how would you decide them?

level: principalimportance: should knowfreq 30%

basics

~20 s

Write one explicit baseline in a shared Directory.Build.props: GC flavor, DATAS, heap hard limit percent and any memory-conservation level, chosen per service class from load tests, with GC signals on every dashboard and evidence for each exception.

open as a page

As the lead of a .NET team, what evidence would you require before a performance change merges, and how would you keep that rule cheap enough to follow?

level: principalimportance: should knowfreq 26%

basics

~20 s

Require a BenchmarkDotNet comparison with the old code as baseline and [MemoryDiagnoser], run in Release on a quiet machine, plus a before-and-after production signal from counters or a trace, and scale that bar to how risky the change is.

open as a page

In a .NET TPL Dataflow log pipeline of TransformBlock, BatchBlock and ActionBlock, why does memory grow without limit, and why does awaiting the last block's Completion hang?

level: seniorimportance: nice to knowfreq 18%

basics

~20 s

Dataflow blocks buffer without limit by default, so a fast parser fills memory ahead of a slow writer; set BoundedCapacity and feed with SendAsync. The hang comes from LinkTo without PropagateCompletion, or from a head block nobody calls Complete() on.

open as a page

In .NET, what does [LibraryImport] generate at compile time that [DllImport] leaves to the runtime, and what must a project change to switch?

level: seniorimportance: nice to knowfreq 15%

basics

~20 s

[DllImport] has the runtime build and JIT-compile an IL marshalling stub at run time. [LibraryImport] (.NET 7) has a source generator emit that marshalling as C# at build time; methods become static partial and the project needs AllowUnsafeBlocks.

open as a page

A .NET 10 worker runs as a systemd unit with Type=notify; what does AddSystemd change, and what goes wrong if the call is missing?

level: seniorimportance: nice to knowfreq 18%

basics

~20 s

AddSystemd swaps in SystemdLifetime, which sends READY=1 over systemd's NOTIFY_SOCKET once the host has started and STOPPING=1 when it stops, and switches console logs to the systemd formatter. Without it a Type=notify unit never hears READY=1 and its start times out.

open as a page

showing 31–36 of 36