I have an enum of type uint
in my class and a function with a uint argument. But when I call that function (setColor
) with an enum as argument, I get the error:
Error 3 Argument 1: cannot convert from 'Test.Form1.colors' to 'uint'
This is my class:
namespace Test{
public partial class Form1 : Form
{
enum color : uint {off, red, yellow};
setColor(uint color){
...
}
MyFunction()
{
setColor(color.red);
}
}
}