Folks, I thought this would be valid:

 

public enum MyEnum { Foo, Bar, Whizz, Bang };

:

PassEnumToMethod(MyEnum[] enums)

:

Void PassEnumToMethod(Enum[] enums)

{

    // Generic code for any type of Enum here

}

 

The C# compiler says it can't convert from MyEnum to System.Enum. It may be
early on Sunday morning, but what am I forgetting?

 

Cheers,

Greg

Reply via email to