Пример #1
0
        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);
        }
Пример #2
0
        public static cycleunit str2unit(string s)
        {
            cycleunit unit;

            for (unit = 0; unit < cycleunit.max; unit++)
            {
                if (unit.ToString() == s)
                {
                    break;
                }
            }
            return(unit);
        }