Beispiel #1
0
        public static Point Parse(string str)
        {
            Point p;

            if (Point.TryParse(str, out p))
            {
                return(p);
            }
            throw new ArgumentException("Cannot create Point from '" + str + "'");
        }
Beispiel #2
0
        public static Vector Parse(string str)
        {
            Point p;

            if (Point.TryParse(str, out p))
            {
                return(new Vector(p.X, p.Y));
            }
            throw new ArgumentException("Cannot create Vector from '" + str + "'");
        }