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'
Loading
chellappan pandiarajanPosted Jan 16, 2013, 8:47 AM
change public static string Defaults{ get { return defaultColor; } }
to
public static System.Drawing.Color Defaults{ get { return defaultColor; } }
it will work
-Pandian
GhazyPosted Jan 16, 2013, 8:50 AM
You code should be like below
public static system.drawing.color Defaults{ get { return defaultColor; } }