Menu

#69 req:Coordinate.toString() should return x,y instead of (x,y)

open
Framework (8)
5
2012-08-25
2012-08-21
v1nce
No

when dealing with coord I'd like toString to return x,y instead of (x, y).
would be easier with svg syntax for path

see Coordinate.cs
public override string ToString()
{
return string.Format("({0}, {1})", X, Y); <= replace with {0},{1}
}

Discussion

  • Maurits Rijk

    Maurits Rijk - 2012-08-25
    • labels: 685109 --> Framework
    • assigned_to: nobody --> mrijk
     
  • Maurits Rijk

    Maurits Rijk - 2012-08-25

    The function ToString just formats an object in some human readable format. It's not really intended to have a specific format you can rely upon.

    If you want to export to SVG it probably makes more sense to extend to your own class or maybe use an extension method in C#.

    I will probably close this issue as WontFix.

     
  • v1nce

    v1nce - 2012-08-25

    I'll go with extensions.

    But your readability argument won't work with french settings ;) coz double are written like this xxx,yyy (and not the US xxx.yyy)

    I think you should add a culture invariant transformation of double.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.