Search code examples
c#listvisual-studiotuplesnumber-formatting

List of tuple<double,double>. Comma instead of point in double values


The situation: I have a list of tuple, in which a tuple is added:

List<Tuple<double, double>> list = new List<Tuple<double, double>>();
list .Add(new Tuple<double, double>(2.2, 6.6));

All seems to be ok. But... In Debugging mode, in the list of local vars I see next:

[0] {(2,2, 6,6)}    System.Tuple<double,double>

By the way, the backword action working good:

double t = list[0].Item1;

I got:

t   2.2 double

May be it's not a big problem, but it frustrates me.

Any ideas why so?


Solution

  • Because the debugger shows numbers in your local (user) national format, so it shows them as 2,2 and 6,6 instead of 2.2 and 6.6 .

    I know various work places that use English versions of OS and Visual Studio so not to have similar problems :-) This is clearly not necessary, because you can...

    ...change in the Control Panel (International Settings) the format of decimal numbers.