Browse by Topic

Popular

Latest

Latest Posts

Illustration of nested boxes representing recursive pattern matching in C#
C#

C# Recursive Pattern Matching Explained

Learn how recursive patterns in C# simplify complex data inspections with nested positional and property patterns, switch expressions, and pattern combinators.

C# pattern matchingrecursive patternspositional patternsproperty patterns
C# code with is pattern matching syntax, featuring a highlighted is expression and property pattern with visual cues of type checking
C#

C# Is Pattern Matching: Syntax and Use

c# is pattern matching: Learn how the `is` pattern in C# works, from type checks to property and relational patterns, with practical code examples and performance insi...

pattern matchingC# syntaxswitch expressionsproperty patterns
Illustration of a C# list pattern matching a collection of elements with brackets and a slice operator.
C#

C# List Pattern: Match Collections with Concise Syntax

c# list pattern: Understand C# list patterns, a concise way to match collection length and elements in pattern matching contexts.

C#Pattern MatchingList Patterns.NET
Illustration of a C# positional pattern matching an object by deconstructing it into parts, with a switch expression in the background.
C#

C# Positional Pattern: Matching Objects by Shape

Learn how the C# positional pattern uses deconstruction to match objects by shape, with practical switch-expression examples and common pitfalls.

C#Pattern MatchingSwitch ExpressionsDeconstruction
C# property pattern diagram showing an object being matched against property conditions with arrows pointing to match branches
C#

C# Property Pattern with Examples

Learn how to use the C# property pattern to match objects based on their properties, with practical examples and common pitfalls.

Pattern MatchingC# SyntaxProperty ValidationSwitch Expressions
Illustration of a switch expression branching on constant values in C#
C#

Using the C# Constant Pattern in Switch Expressions

Learn how the C# constant pattern works in switch expressions and statements, including syntax, matching rules, and practical use cases.

C# pattern matchingswitch expressionsconstant patterntype patterns
A flowchart-like visual showing an object being matched to multiple type branches in C#.
C#

C# Type Pattern: Syntax and Usage

Learn how to use the C# type pattern with is expressions and switch statements for type testing and property matching.

type patternspattern matchingC# switchis expression
C# pattern matching concept showing a switch expression branching to type and property patterns on a clean background.
C#

C# Pattern Matching: Syntax and Practical Use

c# pattern matching: Explore C# pattern matching with practical examples: type, property, and positional patterns, switch expressions, and when to use them effectively.

C#pattern matchingswitch expressionstype patterns
Illustration of a C# custom iterator concept, showing a sequence being generated lazily with a state machine and yield return.
C#

Creating a C# Custom Iterator with yield

c# custom iterator: Learn how to build a C# custom iterator using yield return, when it's useful, and how it affects performance and memory.

yield returnIEnumerable<T>state machinelazy evaluation
Diagram showing IEnumerable as an iterable contract and IEnumerator as a stateful cursor advancing through a sequence in C#.
C#

IEnumerable vs IEnumerator in C#: Key Differences

Understand how IEnumerable and IEnumerator work in C#, how foreach uses both interfaces, and when to implement each interface directly.

C#IEnumerableIEnumeratorLINQ