On .Net Framework, "0".StartsWith("\x1d")
evaluates to false
. (fiddle)
On .Net Core 7, "0".StartsWith("\x1d")
evaluates to true
. (fiddle)
Why?!
Note: Yes, I understand I can use string.StartsWith(char)
or string.StartsWith(string, StringComparison.Ordinal)
to avoid this. I'm asking why this code changed in behavior.