Jeff Verdegan wrote:
Stuart A. Burkett wrote:You can't.
John Vorwald wrote:You could use the ordinal method.
That depends on whether the OP is talking about an Enumeration or an Enum (enum). Given that he said "Enumeration" and is asking about the "previous element," my money is on Enumeration.
drac yang wrote:
John Vorwald wrote:It may be worth pointing out that since the hash code is an int, and there are 4294967295 values for int, all possible hash codes can be generated with a seven character string.
if it's only for alphabets, seven character string could represent totally 26^7 = 8031810176 which is bigger than all the int number 2^32 = 4294967296
it might be sufficient though, it's possible to find two different strings with the same hashcode.