Code inspection: String ordering is culture-sensitive
This inspection reports string ordering that relies on the default comparer. The resulting order depends on the current culture and on the globalization settings of the runtime. To make the order predictable, pass an explicit StringComparer.
Example
names.Sort();
names.Sort(StringComparer.Ordinal);
Use the same approach for LINQ ordering:
var ordered = names.OrderBy(name => name, StringComparer.Ordinal);
27 October 2026