ColorConverter c = new ColorConverter(); object obj = c.ConvertFrom("Red"); Color color = (Color)obj; [解决办法] Color.FromName,颜色应该是系统自带的 [解决办法] Color.FromName [解决办法]
switch(stringColor) { case red; return Color.Red; break; case ...; …… } [解决办法] Color.FromName [解决办法]