Browse by Topic
Popular
Popular Posts
Latest
Latest C# Posts
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.
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.
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# 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# 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.
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# 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# Throw Exception: Syntax and Correct Usage
Learn how to throw exceptions in C#, including correct syntax, custom exception types, rethrowing, and common pitfalls.
C# Throw Keyword: Syntax, Rethrowing, and Filters
Practical guide to the C# throw keyword: syntax, rethrowing exceptions, exception filters, custom exceptions, and performance tradeoffs.
C# Finally Block: Execution Guarantees and Usage
Learn how the C# finally block guarantees cleanup runs, how it interacts with return and exceptions, and when it does not execute.