David Spades wrote:in this method, I'd like to do type checking based on myEnum passed as the first param. the second param must be of same type as myEnum.fieldType.
How do I get this to work?
If you want the compiler to check the type of the second parameter, then the type of myEnum.fieldType must be known at compile time. Your posted code is a bit off (as per what Darryl said) and your example with only one enum member isn't sufficient, I don't think, but I doubt you're going to get it to work. But if you'd like to work on your example a bit, perhaps something can be done.