79739061

Date: 2025-08-18 17:28:21
Score: 0.5
Natty:
Report link

When you perform an OrdinalIgnoreCase string comparison:

The StringComparer returned by the OrdinalIgnoreCase property treats the characters in the strings to compare as if they were converted to uppercase using the conventions of the invariant culture, and then performs a simple byte comparison that is independent of language.

To replicate OrdinalIgnoreCase for chars instead of strings, you call char.ToUpperInvariant on the two characters, then test for equality.

Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): When you
  • Low reputation (0.5):
Posted by: Dwedit