How to convert a string into a Point?

后端 未结 4 1137
执笔经年
执笔经年 2020-12-21 02:43

I have a list of strings of the format \"x,y\". I would like to make them all into Points. The best Point constructor I can find takes two ints. What is the best way in C# t

4条回答
  •  我在风中等你
    2020-12-21 03:09

    There is Point.Parse (System.Windows.Point.Parse, WindowsBase.dll) and then you don't need to mess around with regex or string splitting etc.

    http://msdn.microsoft.com/en-us/library/system.windows.point.parse.aspx

    PK :-)

提交回复
热议问题