public static List <string> cycleunitlist() { List <string> list = new List <string>(); for (cycleunit unit = 0; unit < cycleunit.max; unit++) { list.Add(unit.ToString()); } return(list); }
public static cycleunit str2unit(string s) { cycleunit unit; for (unit = 0; unit < cycleunit.max; unit++) { if (unit.ToString() == s) { break; } } return(unit); }