// 1. 用户输入性别,存入ss = Console.ReadLine();// 2. 将s转为你的枚举try{gender = (Mj_Gender)Enum.Parse(typeof(Mj_Gender), s);}catch ( Exception ex ){Console.WriteLine("您只能输入男 / 女");return s;}