I don’t think you can do it that way - enums (which Cpu.Pin & FEZ_Pin are) lose their type when you cast them to something else… It’s not like a sub class/base class where you can go back and forth between the two types.
For something like this, I’d probably add another parameter to the constructor to specify the type. That or (somewhat gross) have a lookup table/switch-case that determines the type based on the pin number…