将字符串转换成System.Drawing.Color类型

System.Drawing.Color.Red.ToString()的值是"Color[Red]",那么,我如何才能将字符串"Color[Red]"转移成System.Drawing.Color类型的值呢

如下 

 System.Drawing.ColorConverter cc = new ColorConverter();
string colorString = cc.ConvertToString(Color.Red );
Color c = (Color)cc.ConvertFromString(colorString);
MessageBox.Show(c.ToString ());

原文地址:https://www.cnblogs.com/yeye518/p/2231680.html