C# practice
Every C# exercise, built from a topic you can open beside it.
88 exercises runs offline
All tracks Python 139 JavaScript 184 TypeScript 76 Go 106 Rust 75 Java 81 Kotlin 66 C++ 92 C# 88 Swift 68 PHP 69 Frontend 82 Backend 139 Architecture and system design 25 DevOps and cloud 15 Data and databases 5 Data science 31 AI and LLM engineering 75 Security 26 Game development 26 Coding in the AI era 101 CS foundations 164
level
c# Quiz new Which value can be used directly as a C# attribute argument? Understand how C# attributes store declarative metadata, how targets, arguments, inheritance, and reflection work, and what generated code gets wrong. c# Quiz new A project defines `[Cache(60)]` and applies it to a method, but no framework component re… Understand how C# attributes store declarative metadata, how targets, arguments, inheritance, and reflection work, and what generated code gets wrong. c# Predict the output new What does this program print? Understand how C# attributes store declarative metadata, how targets, arguments, inheritance, and reflection work, and what generated code gets wrong. c# Review AI code new Review generated command catalog Understand how C# attributes store declarative metadata, how targets, arguments, inheritance, and reflection work, and what generated code gets wrong. c# Spot the bug new Spot the bug in the property attribute Understand how C# attributes store declarative metadata, how targets, arguments, inheritance, and reflection work, and what generated code gets wrong. c# Spot the bug new Spot the bug in repeated attributes Understand how C# attributes store declarative metadata, how targets, arguments, inheritance, and reflection work, and what generated code gets wrong. c# Quiz new Which collection best expresses processing restock requests in arrival order? Choose C# collections by access pattern, equality, order, and concurrency, then avoid bugs involving mutable keys, read-only views, and compound operations. c# Quiz new Which property must hold while an object is a Dictionary key? Choose C# collections by access pattern, equality, order, and concurrency, then avoid bugs involving mutable keys, read-only views, and compound operations. c# Predict the output new What does this program print? Choose C# collections by access pattern, equality, order, and concurrency, then avoid bugs involving mutable keys, read-only views, and compound operations. c# Predict the output new What counts are printed after the source list changes? Choose C# collections by access pattern, equality, order, and concurrency, then avoid bugs involving mutable keys, read-only views, and compound operations. c# Review AI code new Review generated product catalog Choose C# collections by access pattern, equality, order, and concurrency, then avoid bugs involving mutable keys, read-only views, and compound operations. c# Spot the bug new Spot the bug in stock cleanup Choose C# collections by access pattern, equality, order, and concurrency, then avoid bugs involving mutable keys, read-only views, and compound operations. c# Quiz new What runtime guarantee does string? add compared with string? Understand C# copy semantics, nullability, numeric conversions, and boxing, then avoid the type errors common in generated code. c# Predict the output new What does this program print? Understand C# copy semantics, nullability, numeric conversions, and boxing, then avoid the type errors common in generated code. c# Predict the output new What does this program print when a nullable value is boxed? Understand C# copy semantics, nullability, numeric conversions, and boxing, then avoid the type errors common in generated code. c# Review AI code new Review generated invoice importer Understand C# copy semantics, nullability, numeric conversions, and boxing, then avoid the type errors common in generated code. c# Spot the bug new Spot the bug in the order total Understand C# copy semantics, nullability, numeric conversions, and boxing, then avoid the type errors common in generated code. c# Quiz new What extra restriction does a public event impose compared with a public delegate field? Delegates turn methods into type-safe values; events restrict who can publish notifications. Learn invocation lists, identity, capture, and async boundaries. c# Predict the output new Which value does this multicast delegate call print? Delegates turn methods into type-safe values; events restrict who can publish notifications. Learn invocation lists, identity, capture, and async boundaries. c# Predict the output new What does this program print after one duplicate handler is removed? Delegates turn methods into type-safe values; events restrict who can publish notifications. Learn invocation lists, identity, capture, and async boundaries. c# Review AI code new Review generated report notifier Delegates turn methods into type-safe values; events restrict who can publish notifications. Learn invocation lists, identity, capture, and async boundaries. c# Spot the bug new Spot the bug in the callback loop Delegates turn methods into type-safe values; events restrict who can publish notifications. Learn invocation lists, identity, capture, and async boundaries. c# Quiz new Given a public field-like event, what can ordinary code outside its declaring type do? Understand how C# events are declared, subscribed, raised, and released, including real traps around ordering, exceptions, and async handlers. c# Predict the output new Which lines does this program print? Understand how C# events are declared, subscribed, raised, and released, including real traps around ordering, exceptions, and async handlers. c# Predict the output new What does this program print after the same handler is added twice and removed once? Understand how C# events are declared, subscribed, raised, and released, including real traps around ordering, exceptions, and async handlers. c# Review AI code new Review generated price notification Understand how C# events are declared, subscribed, raised, and released, including real traps around ordering, exceptions, and async handlers. c# Spot the bug new Spot the bug in dashboard subscription Understand how C# events are declared, subscribed, raised, and released, including real traps around ordering, exceptions, and async handlers. c# Predict the output new Which two lines does this program print? Understand how C# exceptions are thrown, filtered, unwound, and propagated through tasks without losing the evidence needed to diagnose failure. c# Predict the output new What count does the program print after awaiting the combined task? Understand how C# exceptions are thrown, filtered, unwound, and propagated through tasks without losing the evidence needed to diagnose failure. c# Quiz new A catch block records a failure and must propagate the same exception. Which statement pr… Understand how C# exceptions are thrown, filtered, unwound, and propagated through tasks without losing the evidence needed to diagnose failure. c# Review AI code new Review generated price client Understand how C# exceptions are thrown, filtered, unwound, and propagated through tasks without losing the evidence needed to diagnose failure. c# Spot the bug new Spot the bug in customer lookup Understand how C# exceptions are thrown, filtered, unwound, and propagated through tasks without losing the evidence needed to diagnose failure. c# Predict the output new What does the program print after the captured variable changes? Represent lambdas as inspectable and translatable object trees; understand node types, parameter identity, visitors, compilation, and LINQ provider boundaries. c# Predict the output new Which node kind does this program print? Represent lambdas as inspectable and translatable object trees; understand node types, parameter identity, visitors, compilation, and LINQ provider boundaries. c# Quiz new A repository must let its database provider translate a caller-supplied filter. Which par… Represent lambdas as inspectable and translatable object trees; understand node types, parameter identity, visitors, compilation, and LINQ provider boundaries. c# Review AI code new Review generated dynamic filter Represent lambdas as inspectable and translatable object trees; understand node types, parameter identity, visitors, compilation, and LINQ provider boundaries. c# Spot the bug new Spot the bug in dynamic comparison Represent lambdas as inspectable and translatable object trees; understand node types, parameter identity, visitors, compilation, and LINQ provider boundaries. c# Spot the bug new Spot the bug in predicate composition Represent lambdas as inspectable and translatable object trees; understand node types, parameter identity, visitors, compilation, and LINQ provider boundaries. c# Predict the output new What does this program print? Understand how C# programs execute through expressions, statements, control flow, and methods, with a reliable model for types and input boundaries. c# Predict the output new Which lines does this program print? Understand how C# programs execute through expressions, statements, control flow, and methods, with a reliable model for types and input boundaries. c# Review AI code new Review generated order summary Understand how C# programs execute through expressions, statements, control flow, and methods, with a reliable model for types and input boundaries. c# Spot the bug new Spot the bug in the array sum Understand how C# programs execute through expressions, statements, control flow, and methods, with a reliable model for types and input boundaries. c# Quiz new What does var mean in var amount = 12.5m;? Understand how C# programs execute through expressions, statements, control flow, and methods, with a reliable model for types and input boundaries. c# Quiz new Can C# infer T in Create<T>() from assigning its result to Customer customer? Use type parameters to design reusable, type-safe C# APIs, with precise constraints, inference, variance, and runtime generic behavior. c# Predict the output new What does this program print? Use type parameters to design reusable, type-safe C# APIs, with precise constraints, inference, variance, and runtime generic behavior. c# Predict the output new What values are printed by these generic static fields? Use type parameters to design reusable, type-safe C# APIs, with precise constraints, inference, variance, and runtime generic behavior. c# Review AI code new Review generated token deduplicator Use type parameters to design reusable, type-safe C# APIs, with precise constraints, inference, variance, and runtime generic behavior. c# Spot the bug new Spot the bug in the generic search Use type parameters to design reusable, type-safe C# APIs, with precise constraints, inference, variance, and runtime generic behavior. c# Quiz new Given Dog : Animal, which assignment is valid because of generic variance? Use type parameters to design reusable, type-safe C# APIs, with precise constraints, inference, variance, and runtime generic behavior. c# Quiz new What does AsEnumerable do in an IQueryable pipeline? Compose type-safe queries with LINQ; understand deferred execution, materialization, operator contracts, ordering, and provider boundaries. c# Quiz new A validated email must identify exactly one account. Which operator best enforces that re… Compose type-safe queries with LINQ; understand deferred execution, materialization, operator contracts, ordering, and provider boundaries. c# Predict the output new What does this program print after the source list changes? Compose type-safe queries with LINQ; understand deferred execution, materialization, operator contracts, ordering, and provider boundaries. c# Predict the output new Which name order does this program print? Compose type-safe queries with LINQ; understand deferred execution, materialization, operator contracts, ordering, and provider boundaries. c# Review AI code new Review a generated customer totals query Compose type-safe queries with LINQ; understand deferred execution, materialization, operator contracts, ordering, and provider boundaries. c# Spot the bug new Spot the bug in report enumeration Compose type-safe queries with LINQ; understand deferred execution, materialization, operator contracts, ordering, and provider boundaries. c# Quiz new Why can an arbitrary IEnumerable<string> not be matched directly with ["run", var file]? Match runtime types and data shapes safely in C#, with explicit ordering, null handling, exhaustiveness, and list-pattern boundaries. c# Predict the output new What does this program print? Match runtime types and data shapes safely in C#, with explicit ordering, null handling, exhaustiveness, and list-pattern boundaries. c# Predict the output new Which label does this three-element command produce? Match runtime types and data shapes safely in C#, with explicit ordering, null handling, exhaustiveness, and list-pattern boundaries. c# Review AI code new Review a generated command router Match runtime types and data shapes safely in C#, with explicit ordering, null handling, exhaustiveness, and list-pattern boundaries. c# Spot the bug new Spot the bug in the age classifier Match runtime types and data shapes safely in C#, with explicit ordering, null handling, exhaustiveness, and list-pattern boundaries. c# Quiz new What does value is string text establish when the match succeeds? Match runtime types and data shapes safely in C#, with explicit ordering, null handling, exhaustiveness, and list-pattern boundaries. c# Quiz new Which statement about `public required string Name { get; init; }` is correct? Understand C# properties, accessors, auto-properties, init, and required, including validation, mutability, and ownership traps. c# Predict the output new What does this program print? Understand C# properties, accessors, auto-properties, init, and required, including validation, mutability, and ownership traps. c# Review AI code new Review generated user profile Understand C# properties, accessors, auto-properties, init, and required, including validation, mutability, and ownership traps. c# Spot the bug new Spot the bug in team membership Understand C# properties, accessors, auto-properties, init, and required, including validation, mutability, and ownership traps. c# Spot the bug new Spot the bug in the Name setter Understand C# properties, accessors, auto-properties, init, and required, including validation, mutability, and ownership traps. c# Quiz new Why does a base record not compare equal to a derived record with the same shared values? Model data with C# record classes and record structs while keeping equality, copying, mutability, and inheritance behavior explicit. c# Predict the output new What does this program print? Model data with C# record classes and record structs while keeping equality, copying, mutability, and inheritance behavior explicit. c# Predict the output new What does this shallow-copy example print? Model data with C# record classes and record structs while keeping equality, copying, mutability, and inheritance behavior explicit. c# Quiz new Which statement about positional record structs is correct? Model data with C# record classes and record structs while keeping equality, copying, mutability, and inheritance behavior explicit. c# Review AI code new Review a generated search cache key Model data with C# record classes and record structs while keeping equality, copying, mutability, and inheritance behavior explicit. c# Spot the bug new Spot the bug in the record cache key Model data with C# record classes and record structs while keeping equality, copying, mutability, and inheritance behavior explicit. c# Quiz new A scanner needs recorded attribute arguments but must not instantiate the attribute. Whic… Inspect types and members at runtime, select overloads precisely, invoke code safely, and handle attributes, trimming, and Native AOT boundaries. c# Predict the output new What two type names does this program print? Inspect types and members at runtime, select overloads precisely, invoke code safely, and handle attributes, trimming, and Native AOT boundaries. c# Predict the output new How many properties does this lookup print? Inspect types and members at runtime, select overloads precisely, invoke code safely, and handle attributes, trimming, and Native AOT boundaries. c# Quiz new A mapper may write only properties with public setters. Which test expresses that contrac… Inspect types and members at runtime, select overloads precisely, invoke code safely, and handle attributes, trimming, and Native AOT boundaries. c# Review AI code new Review a generated reflection command router Inspect types and members at runtime, select overloads precisely, invoke code safely, and handle attributes, trimming, and Native AOT boundaries. c# Spot the bug new Spot the bug in overload lookup Inspect types and members at runtime, select overloads precisely, invoke code safely, and handle attributes, trimming, and Native AOT boundaries. c# Quiz new Generator A emits a type that generator B wants to inspect. What is safe for ordinary sou… Add C# source during compilation and design incremental pipelines, semantic matching, deterministic output, diagnostics, and reliable generator tests. c# Quiz new Which pipeline model gives Roslyn the clearest stable value boundary? Add C# source during compilation and design incremental pipelines, semantic matching, deterministic output, diagnostics, and reliable generator tests. c# Predict the output new What does this program print when the platform source generator is available? Add C# source during compilation and design incremental pipelines, semantic matching, deterministic output, diagnostics, and reliable generator tests. c# Review AI code new Review a generated route source generator Add C# source during compilation and design incremental pipelines, semantic matching, deterministic output, diagnostics, and reliable generator tests. c# Spot the bug new Spot the bug in the attribute filter Add C# source during compilation and design incremental pipelines, semantic matching, deterministic output, diagnostics, and reliable generator tests. c# Quiz new A method stores caller data, awaits I/O, then reads the data. Which parameter best expres… Use Span<T> and Memory<T> for contiguous memory views while keeping slicing, async boundaries, ownership, and stack allocation explicit. c# Predict the output new What does the read-only view print after the variable is rebound? Use Span<T> and Memory<T> for contiguous memory views while keeping slicing, async boundaries, ownership, and stack allocation explicit. c# Predict the output new What does this program print after writing through the slice? Use Span<T> and Memory<T> for contiguous memory views while keeping slicing, async boundaries, ownership, and stack allocation explicit. c# Review AI code new Review a generated pooled frame reader Use Span<T> and Memory<T> for contiguous memory views while keeping slicing, async boundaries, ownership, and stack allocation explicit. c# Spot the bug new Spot the bug in pooled memory Use Span<T> and Memory<T> for contiguous memory views while keeping slicing, async boundaries, ownership, and stack allocation explicit.
No practice items match these filters.