Handle Exceptions Like a BOSS - Try Catch Finally and Disposable in C#
April 22, 2024
• 1,124 views
try catch finallytry catch finally blockcontrol flow of try catch finally blockexception handlingtry catch c#c sharp try catchtry catch c sharpc# try catchc# exception handling best practicesexception c#c# exception handlingc# try catch finallyc# exceptiondotnetc# exceptionstry catch finally c#try catch in c#IDisposablec# disposedispose pattern c#idisposable in c#catch exceptions in C#exceptions and exception handling in c#.netC#
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#!
