Create a comprehensive C# quiz for senior developers. ## Target Audience Senior C# developers who should be tested on general, universally-known knowledge. Focus on .NET platform fundamentals — the
Value types vs reference types, structs vs classes, records, boxing/unboxing, stack vs heap allocation, memory layout, readonly structs, ref structs, and stack-only types.
38 questionsGeneric types and methods, type constraints (where clauses), covariance and contravariance, generic type inference, open vs closed generic types, generic type caching, and default values in generics.
38 questionsDelegates, multicast delegates, anonymous methods, lambdas, events and event patterns, Func<>, Action<>, Predicate<T>, event invocation patterns, custom event accessors, and weak events concept.
37 questionsQuery syntax vs method syntax, deferred vs immediate execution, IQueryable vs IEnumerable, standard query operators, performance considerations, PLINQ and AsParallel, expression trees vs delegates.
Task and Task<T>, async/await state machine compilation, synchronization context, ConfigureAwait(false), ValueTask<T>, CancellationToken and cooperative cancellation, async pitfalls, Task.Run vs ValueTask, IAsyncEnumerable (async streams).
38 questionsGarbage collector generations (Gen 0, 1, 2), IDisposable and using statement, finalizers and Dispose pattern, Large Object Heap (LOH), memory pressure hints, SafeHandle for native resources, object pooling, GC modes (Workstation, Server, Concurrent).
38 questionsNullable annotations (?, ??, !), null state analysis, nullable attributes (MaybeNull, NotNull, AllowNull, DisallowNull), interop with nullable value types, nullable warnings and suppression, generic nullability.
38 questionsSwitch expressions, property patterns, positional patterns with deconstruction, tuple patterns, when clauses, list patterns (C# 11+), or patterns, and patterns, not patterns, and type patterns.
37 questionsICollection, IList, IDictionary interfaces, Span<T> and ReadOnlySpan<T>, Memory<T> and ReadOnlyMemory<T>, ArrayPool<T> for pooling, collection initialization expressions, immutable collections (ImmutableList, ImmutableDictionary), concurrent collections (ConcurrentDictionary, ConcurrentBag), PriorityQueue (C# 10+).
38 questionsIndexers (this[ ]), iterators (yield return, yield break), extension methods, expression trees (Expression<T>), operator overloading, implicit and explicit conversion operators, dynamic type and DLR, Caller info attributes (CallerMemberName, etc.).
37 questionstry/catch/finally, exception filters, custom exceptions, exception propagation, best practices, and exception handling patterns in C#.
34 questionsThread, Task, ThreadPool, lock, Monitor, Interlocked, SemaphoreSlim, ReaderWriterLockSlim, Mutex, volatile, memory model, and thread-safe patterns.
34 questions