BrandGhost
Handle Exceptions Like a BOSS - Try Catch Finally and Disposable in C#

Handle Exceptions Like a BOSS - Try Catch Finally and Disposable in C#

Exception handling is an important part of programming, and in C# in particular. We have try catch in C# to help us with being able to catch exceptions, but we can take it a step further with try catch finally! The finally block is often used for helping run clean up code. It wouldn't be fair to make this video without mentioning another related pattern that we have, and that's the dispose pattern using IDisposable in C#!
An error has occurred. This application may no longer respond until reloaded. Reload