Very nice method.

It's very pity that it can't be used for structures that contains a field declared as enum.