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.
How computers execute code, number systems (binary, decimal, hexadecimal), bits and bytes, text encoding (ASCII, Unicode, UTF-8, UTF-16) and endianness.
The full journey of .NET code: Roslyn compiles C# to IL, the runtime loads the assembly, the JIT (with tiered compilation and Dynamic PGO) or an AOT compiler turns IL into machine code, and the CPU runs those instructions.
Positional number systems (base 2, 10 and 16), converting between them by hand and in C#, and why hex is the natural way to read bytes, memory addresses, colours, hashes and GUIDs.
Bits, bytes and two's complement; the sizes and ranges of C# numeric types; unchecked versus checked overflow; and bitwise operations and flags enums.
Why text needs an encoding, what ASCII covers and where it stops, how Unicode assigns code points, and how code points, code units, bytes and user-perceived characters (grapheme clusters) differ.
How UTF-8 and UTF-16 encode code points, surrogate pairs, why .NET strings are UTF-16 internally, when UTF-8 is used, and how to count, slice and limit text correctly with Rune and StringInfo.
A practical debugging walkthrough for mojibake and replacement characters: reading the bytes in hex, identifying UTF-8 versus Windows-1252 and double encoding, the BOM and Excel, and fixing both export and import paths in .NET.
Big-endian versus little-endian byte order, which platforms and protocols use which, network byte order, and the .NET APIs (BinaryPrimitives, BinaryReader, BitConverter, Guid) that handle byte order explicitly or implicitly.
A code review that combines encoding and endianness: ASCII data loss, truncating by chars instead of bytes, splitting surrogate pairs, BitConverter's machine byte order, missing validation, and an allocation-free rewrite with BinaryPrimitives and UTF-8.