Handling Exceptions in C# - When to catch them, where to catch them, and how to catch them
Handling exceptions is about more than just putting try/catch blocks in your code. Where you put them is very important. It is also important to know when not to put a try/catch in your code. This video covers the best practices of exception handling as well as how to rethrow exceptions, create new exceptions, and capture specific exceptions. Newsletter signup (with exclusive discounts): https://signup.iamtimcorey.com/ (your email will be kept safe and you will not be spammed). Source Code: https://www.iamtimcorey.com/downloads... 0:00 - Intro 0:39 - building a demo console application 9:49 - crashing the application 11:13 - "try-catch" and how NOT to use it 15:00 - continuing with the exception & showing exception information to the user (15:57 ) 17:24 - more useful information: StackTrace 20:31 - "try-catch": best place to put it and why 27:23 - hanging logic demonstration 30:31 - the "finally" code block and "throw" statement. Passing exception up the stack (to UI) 38:08 - common misconceptions and mistakes 40:25 - creating new exception without losing the original StackTrace info 45:36 - recap 47:05 - advanced exception handling 53:09 - summary and tips on value capturing and handling exceptions

Delegates in C# - A practical demonstration, including Action and Func

SQL Stored Procedures - What They Are, Best Practices, Security, and More...

Intro to WebAPI - One of the most powerful project types in C#

Debugging in C# - Finding and Fixing Problems in Your Application

Trump Faces GOP Backlash Over Pulte Pick, Sex Toy Investor Wins Iowa GOP Gov Primary: A Closer Look

C# Async / Await - Make your app more responsive and faster with asynchronous programming

Design Patterns: Single Responsibility Principle Explained Practically in C# (The S in SOLID)

Interfaces in C# - What they are, how to use them, and why they are so powerful.

Testing GitHub Copilot's Pricing After June 1st

Union types in C# | DEM304

Intro to WPF: Learn the basics and best practices of WPF for C#

Please Learn How To Write Tests in Python… • Pytest Tutorial

Static class vs Singleton in C# | C# Interview Questions & Answers | Static & Singleton in CSharp

Working with Null in .NET 6 and C# 10

Intro to Redis in C# - Caching Made Easy

Design Patterns: Don't Repeat Yourself in C#

C# Access Modifiers (beyond public and private) - what they are, how to use them, and best practices

Dynamic Vs Var in C#

Inheritance vs Interfaces in C#: Object Oriented Programming

