Assigns an index that corresponds to the Enum instance value.
true if the specified index was successfully assigned to the Enum instance value; otherwise, the method returns false.