Thursday, July 6, 2023

New Video: Fixing Integer Overflow in C# with "checked"

My YouTube channel has been neglected for a while, and I'd like to start fixing that. So here's a new video: Fixing Integer Overflow in C# with "checked".

Fixing Integer Overflow in C# with "checked"

C# integers overflow by default, meaning if you go past the biggest value of the integer it will wrap to the smallest value. In this video, we will look at how we can turn this behavior into an error by using a "checked" statement, a project-level setting, or a "checked" expression.

This is a fairly quick topic -- just 4 minutes for the basics and a few more minutes of bonus content.

If you prefer reading, you can check out the blog article here: Checking for Overflow in C#.

Let me know if you like the format (or not) by dropping a note in the comments. I am planning on refreshing some of the older topics as well as covering a few new ones.

If you find this video helpful, be sure to pass it along.


Happy Coding!