Browse by Topic

Popular

Latest

Latest Posts

Illustration of a C# delegate being invoked with a null-conditional operator, showing method chain and safety check.
C#

How to Invoke C# Delegates Safely

Practical guidance for invoking C# delegates safely: null handling, multicast behavior, exception isolation, return values, and async patterns.

delegatesinvocationnull-conditionalmulticast
Illustration of multiple method references chaining together in a delegate invocation list
C#

C# Multicast Delegate: Syntax and Behavior

Understand how C# multicast delegates chain method calls, how invocation lists behave at runtime, and practical patterns for safe event handlers.

delegateseventsinvocation listexception handling
C# code illustrating passing a method as a parameter using a delegate arrow symbol.
C#

C# Pass Method as Parameter: Delegates and More

Learn how to pass methods as parameters in C# using delegates, Func, Action, and lambdas, with practical examples and tradeoffs.

C# delegatesAction and Funchigher-order functionsevent handling
Illustration of a C# delegate declaration as a method signature, with a box representing a method reference and an arrow connecting to a target method.
C#

C# Delegate Declaration Explained

Learn how to declare and use C# delegates: signature matching, named methods, lambdas, multicast behavior, built-in Action and Func types, and events.

delegatesC#lambda expressionsmethod references
Illustration of a C# delegate linking a method to an event, with abstract method blocks and a connection arrow.
C#

Practical C# Delegate Usage

Understand C# delegates through practical examples: delegate syntax, multicast invocation, Func/Action types, closure capture, and when to use them for callbacks and events.

DelegatesC#Event HandlingLambda Expressions
Illustration of a custom exception class in C# with properties and serialization attributes, representing structured error handling.
C#

Creating Custom Exceptions in C#

Learn how to define a custom exception in C# that carries precise error context, preserves inner exceptions, and supports serialization across process boundaries.

C#Exception HandlingCustom ExceptionsError Handling
Illustration of multiple catch blocks in C# handling different exception types, showing ordered blocks and a filter condition.
C#

C# Multiple Catch Blocks: Syntax and Ordering

Learn how to use multiple catch blocks in C# to handle different exception types, order them by specificity, use exception filters, and avoid common pitfalls.

C#Exception Handlingtry-catchError Handling
Illustration of a C# exception filter using catch when to conditionally handle exceptions.
C#

C# catch when: Using Exception Filters

Learn how to use the C# catch when clause to filter exceptions with precise conditions and understand how it differs from traditional catch blocks.

C#exception handlingexception filterserror handling
Illustration of a C# exception filter concept showing a catch block with a condition.
C#

Using C# Exception Filters to Control Error Handling

c# exception filter: Learn how C# exception filters work, when to use them, and how they differ from traditional catch blocks.

C#Exception HandlingException FiltersError Handling
A visual comparison of throw and throw ex in C# showing how stack trace information is preserved or lost.
C#

C# throw vs throw ex: Stack Trace Differences Explained

c# throw vs throw ex: Understand the difference between throw and throw ex in C#, how each affects the stack trace, and when to use which for reliable error handling.

C#Exception HandlingStack TraceDebugging