C#

C#

Made by DeepSource

Use underscores to make long numeric literals readable CS-R1076

Anti-pattern
Major

C# 7 and above allows you to use underscores within numeric literals. This makes it easy to comprehend any hardcoded numerics at a glance, thereby improving your code's readability.

Bad Practice

var num = 10000000; // Numeric literal has 8 or more digits

Recommended

var num = 1_00_00_000;