C# has a compiler flag for checked arithmetic, i.e. overflow will throw an exception. You can't use c# for kernel development of course, but the idea has existed for decades (for much longer than c# existed).
That flag is not set by default in the new project templates for whatever reason. There's also an escape hatch, the unchecked keyword, for the rare cases where you need to overflow, e.g. when implementing hash tables.