csharp console waituserinput

2020-12-26  本文已影响0人  大地缸

    //FrequencyCalculator calculator = new FrequencyCalculator();
    protected virtual void waitUserInput () {
        //calculator.Load();
        while (true) {
            
            Console.Write (GetType ().Name.ToLower () + " > ");
            //calculator.Save();
            var line = Console.ReadLine ();
            if(false) // 2020年2月26日
            //calculator.Record(line);
            if (line.Trim () == string.Empty) continue;
            try {

                normalcmdlineprocessor (line);
            } catch (Exception e) {
                Console.WriteLine (e);
            }
        }
    }
上一篇下一篇

猜你喜欢

热点阅读