← back to index

S818 — Literal suffixes should be upper case

Language: C#  |  Type: CODE_SMELL  |  Severity: Minor

Tags: convention, pitfall

Why is this an issue?

Using upper case literal suffixes removes the potential ambiguity between "1" (digit 1) and "l" (letter el) for declaring literals.

Noncompliant code example

const long b = 0l;      // Noncompliant

Compliant solution

const long b = 0L;