This does not work
int blueInt = Color.Blue.ToArgb();
Color fred = Color.FromArgb(blueInt);
Assert.AreEqual(Color.Blue,fred);
Any suggestions?
[change]
I am using NUnit, and the output is
failed:
Expected: Color [Blue]
But it was: Color [A = 255, R = 0, G = 0, B = 255]
[change]
It works!
int blueInt = Color.Blue.ToArgb();
Color fred = Color.FromArgb(blueInt);
Assert.AreEqual(Color.Blue.ToArgb(),fred.ToArgb());
hayrob
source
share