From a37b3d3851fb35d4c5d4c0c0f37c762ea78fde74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Barr=C3=A9?= Date: Wed, 8 May 2024 11:43:07 -0400 Subject: [PATCH] Ban InvariantCulture/InvariantCultureIgnoreCase --- src/files/BannedSymbols.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/files/BannedSymbols.txt b/src/files/BannedSymbols.txt index 071608a..d49f829 100644 --- a/src/files/BannedSymbols.txt +++ b/src/files/BannedSymbols.txt @@ -1,3 +1,8 @@ P:System.DateTime.Now;Use System.DateTime.UtcNow instead. P:System.DateTimeOffset.Now;Use System.DateTimeOffset.UtcNow instead. P:System.DateTimeOffset.DateTime;Use System.DateTimeOffset.UtcDateTime instead. + +F:System.StringComparison.InvariantCulture;InvariantCulture performs a linguistic comparison. Most of the time Ordinal is the correct one. +F:System.StringComparison.InvariantCultureIgnoreCase;InvariantCultureIgnoreCase performs a linguistic comparison. Most of the time OrdinalIgnoreCase is the correct one. +P:System.StringComparer.InvariantCulture;InvariantCulture performs a linguistic comparison. Most of the time Ordinal is the correct one. +P:System.StringComparer.InvariantCultureIgnoreCase;InvariantCultureIgnoreCase performs a linguistic comparison. Most of the time OrdinalIgnoreCase is the correct one.