Why does the following return false?
The value object is of type SomeEnum at runtime.
I'm converting both the object to same type, however I still receive it as false.
What am I doing wrong?
object value = SomeEnum.FirstValue;
object parameter = 0;
Console.Write(Enum.ToObject(value.GetType(), parameter ?? 0) == Enum.Parse(value.GetType(), value.ToString()));
The problem is I cannot directly acess the SomeEnum type and I receive everything as object.