public static string RectToString(Rect rect){ string s = string.Format ("{{{0},{1},{2},{3}}}", rect.x, rect.y, rect.width, rect.height); return s; }