There is no direct way to do this, and that is the right way. let's say you could do:
personTitle = systemPersonTitle;
what will happen to your code if SystemPersonTitles changes to any of them:
public enum SystemPersonTitles1{ Mr=1,Ms=2,Mrs=3 } public enum SystemPersonTitles2{ Mr=0,Ms=1,Mrs=2,UnKnown=3 } public enum SystemPersonTitles3{ Mrs=0,Ms=1,Mr=2 }
Or any other changes you might think of.
you can get around this limitation, but it's just bad programming. If you decide to use the value "int" and lose the ability to enumerate. just use "int" to start ...
Roee gavirel
source share