From 8ecb636a1cd7049038b4c8599464aab0329e05c6 Mon Sep 17 00:00:00 2001 From: Bart Koelman Date: Wed, 25 Oct 2017 11:46:40 +0200 Subject: [PATCH] Added example: binary literal with digit separator --- Src/Guidelines/1500_MaintainabilityGuidelines.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Src/Guidelines/1500_MaintainabilityGuidelines.md b/Src/Guidelines/1500_MaintainabilityGuidelines.md index 068e372b..1761b173 100644 --- a/Src/Guidelines/1500_MaintainabilityGuidelines.md +++ b/Src/Guidelines/1500_MaintainabilityGuidelines.md @@ -64,7 +64,8 @@ Don't use literal values, either numeric or strings, in your code, other than to public class Whatever { public static readonly Color PapayaWhip = new Color(0xFFEFD5); - public const int MaxNumberOfWheels = 18; + public const int MaxNumberOfWheels = 18; + public const byte ReadCreateOverwriteMask = 0b0010_1100; } Strings intended for logging or tracing are exempt from this rule. Literals are allowed when their meaning is clear from the context, and not subject to future changes, For example: