All syntax guides
Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.
3,980 guides across 14 topics
Topics
Popular guides
Most readLatest guides
Page 334 of 398C# IEnumerable: How It Works and When to Use It
C# IEnumerable: Learn how IEnumerable<T> works, including deferred execution, yield return, and when to choose it over List or IQueryable.
C# Yield Break: How to End Iterator Methods
Learn how yield break terminates a C# iterator method, its behavior, and when to use it for early exit in lazy sequences.
C# yield return: Lazy Iteration Explained
Learn how C# yield return creates lazy iterators, when to use it, and how it affects memory and execution.
C# LINQ Immediate Execution: When and How to Force It
Understand when C# LINQ queries actually run, how ToList, ToArray, and aggregate methods force immediate execution, and what that means for performance and correctness.
Using c# eventargs for Custom Event Data
Learn how to use c# eventargs to pass data in events, create custom event argument classes, and follow best practices for .NET event design.
Reading and Preserving C# Exception Stack Traces
Learn how to read, log, and preserve C# exception stack traces, handle async stack traces, and understand the role of PDB files.
Using InnerException in C# to Preserve the Original Error
Learn how C# InnerException preserves the original error when exceptions are wrapped, and how to access the root cause in catch blocks.
C# Custom Exception Class: How to Build One
Learn when and how to create a C# custom exception class, including the standard constructors, serialization, and choosing between built-in and custom exceptions.
C# Enum TryParse: Safe String-to-Enum Parsing
Learn how to parse strings into C# enums safely with Enum.TryParse, including case handling, numeric strings, undefined values, and performance trade-offs.
C# Enum Parse: Converting Strings to Enum Values
c# enum parse: Learn how to parse strings into C# enum values safely, handle invalid input, and manage case sensitivity and flags enums.