goto

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string strIntValue = Console.ReadLine();
            
            compute:
                if (strIntValue.ToUpper() == "CLS")
                {
                    Console.Clear();
                }
                else
                {
                    Console.WriteLine(CommonUtility.ConvertToSmallIntValue(strIntValue));
                    Console.WriteLine();
                }
            
            strIntValue = Console.ReadLine();
            goto compute;
        }
    }
}
原文地址:https://www.cnblogs.com/zhangpengshou/p/2342110.html