How to cast reference to enum to reference to underyling type (int)?
I’m working on a deserializer. The problem is that we have a lot of enums and I’m not gonna create overloads for each one of them. So I tried to first break the reference to enum down to a reference to its underlying type, but somehow it won’t compile: