I have installed Resharper and in this section x.Id.ToString()
it suggests changing to x.Id.ToString(CultureInfo.InvariantCulture)
.
What is CultureInfo.InvariantCulture
and why is it better?
I have installed Resharper and in this section x.Id.ToString()
it suggests changing to x.Id.ToString(CultureInfo.InvariantCulture)
.
What is CultureInfo.InvariantCulture
and why is it better?
I do not have better information but I believe Resharper just wants you be more explicit . Do not make the mistake of using default unintentionally.
It indicates that you want to treat the data in a neutral way, that the computer understands in a universal way. This is a counterpoint to a specific culture that matters the most for humans to understand the die. It is never altered. Specific crops can be altered by legislation or other factors.
The ideal is to work with the invariant culture for every application other than when interacting with users or exchanging information with other components that require a specific culture.