I want to pass an error color from one class to another. I want to use this:
public class Try
{
public static system.drawing.color defaultColor = system.drawing.color.blue;
public static string Defaults{ get { return defaultColor; } }
}
But this brings up an error of Cannot implicitly convert type 'System.Drawing.COlor' to 'string'
C# System.Drawing.Color
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

chellappan pandiarajan79 reputationPosted Jan 16, 2013, 3:47 AM EST
change public static string Defaults{ get { return defaultColor; } }
to
public static System.Drawing.Color Defaults{ get { return defaultColor; } }
it will work
-Pandian
Ghazy11 reputationPosted Jan 16, 2013, 3:50 AM EST
You code should be like below
public static system.drawing.color Defaults{ get { return defaultColor; } }