I've been updating the company's software and stumbled upon this problem. There's this enum that's protected and I want to pass a value from that enum as a parameter for a static method, but I can't cause I have no access to it even though both the method and the enum are in the same class.
Example:
Class SomeClass
{
protected enum Car
{
Id
};
public static void AMethod(Car enumValue)
{
MessageBox.Show("This is an enum:" + enumValue.ToString());
}
}
I can't use this Car enumValue
as parameter for AMethod
cause I have no access to it.
Why can't I do this? I mean they're in the same class. Am I missing something?