Hi, I tried that but in doesn't print anything: foreach (member; __traits(allMembers, type)) { static if (is(typeof(__traits(getMember, type, member)) == enum)) { writeln(member); } } I tried a lot of other ways but nothing compile. thx