C#中字符串转换成枚举类型的方法 其中ActionType是枚举类型,"InListNext"是Actiontype类型的OnKeyUp的取值。 (ActionType)Enum.Parse(typeof(ActionType), "InListNext", true);