How would you convert string to enum

The following code works which was used for testing;

myTarget.category = Info.Category.Planet;  //Works, popup changes to Planet on Info script.

Now I wanted to work automatically, and this did not work, but gives the same result.

print(Category[index]); // The result is Planet.  Ok, lets replace and paste it in.

myTarget.category = Info.Category.Category[index];  // OK, didn't work

This EditorGUILayout.Popup was made as a string, how would you convert this to enum? Thx.

Try Enum.Parse