All syntax guides
Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.
3,965 guides across 14 topics
Topics
Popular guides
Most readLatest guides
Page 353 of 397C# Event Subscription: Syntax, Pitfalls, and Clean Unsubscription
Learn C# event subscription syntax, why unsubscribing matters, how to avoid memory leaks, and when to use lambda, method group, or weak event patterns.
C# Event Declaration: Syntax, Behavior, and Pitfalls
Learn the syntax for declaring C# events, safe ways to raise them, and the difference between events and delegate fields.
C# Event Usage: Declaring, Raising, and Handling Events
Learn how to declare, raise, and handle events in C# with practical examples, thread-safety considerations, and memory-leak prevention.
C# Discard Lambda Parameter: When and How to Use It
Learn how C# 9 lambda discard parameters use `_` for unused inputs, when they improve clarity, and how they apply to delegates, event handlers, and LINQ.
C# Static Lambda: Syntax, Benefits, and Usage
Learn how C# static lambdas avoid capturing instance state, reduce allocations, and improve performance in delegate-heavy code.
C# Lambda Variable Capture: Closures and Pitfalls
Learn how C# lambda expressions capture variables, why foreach and for loops behave differently, and how closures affect memory and performance.
C# Lambda Closure: Variable Capture Explained
Learn how C# lambda closures capture variables, why captured state lives as long as the delegate, and how to avoid common pitfalls like loop variable capture.
C# Lambda vs Delegate: When to Use Each
c# lambda vs delegate: Understand the practical differences between C# lambda expressions and delegates, including syntax, variable capture, and allocation behavior, t...
C# Statement Lambda: Syntax and Practical Usage
Learn C# statement lambdas, their syntax, how they differ from expression lambdas, and when to use them in delegates, LINQ, and async code.
C# Expression Lambda: Syntax and Practical Usage
c# expression lambda: Learn C# expression lambda syntax, how it differs from statement lambdas, and where it fits in LINQ, delegates, and expression trees.