Code inspection: Invocation is culture-sensitive
This inspection reports method calls that implicitly use the current culture. The result of such calls can change depending on the culture of the user who runs the code. To make the result predictable, pass a culture, an IFormatProvider, or a StringComparison value explicitly.
Example
var key = name.ToLower();
var text = date.ToString();
using System.Globalization;
var key = name.ToLowerInvariant();
var text = date.ToString(CultureInfo.InvariantCulture);
For string ordering or search, use an explicit StringComparison value.
27 October 2026