using System.Drawing; namespace ObjectConvert ... { public sealed class Convert ...{ private Convert() ...{ } Font#region Font public static string FontToString(Font value) ...{ return new FontConverter().ConvertToString(value); } public static Font StringToFont(string text) ...{ if (string.IsNullOrEmpty(text)) return null; return new FontConverter().ConvertFromString(text) as Font; } #endregion Size#region Size public static string SizeToString(Size value) ...{ return new SizeConverter().ConvertToString(value); } public static Size StringToSize(string text) ...{ if (string.IsNullOrEmpty(text)) return new Size(0, 0); return (Size)new SizeConverter().ConvertFromString(text); } #endregion Point#region Point public static string PointToString(Point value) ...{ return new PointConverter().ConvertToString(value); } public static Point StringToPoint(string text) ...{ if (string.IsNullOrEmpty(text)) return Point.Empty; return (Point)new PointConverter().ConvertFromString(text); } #endregion Color#region Color public static string ColorToString(Color value) ...{ return new ColorConverter().ConvertToString(value); } public static Color StringToColor(string text) ...{ if (string.IsNullOrEmpty(text)) return Color.Empty; return (Color)new ColorConverter().ConvertFromString(text); System.Convert. } #endregion }}