028-86922220

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

十九、循环控制之无限循环

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

namespace _19.流程控制之无限循环
{
    class Program
    {
        static void Main(string[] args)
        {
            // 无限循环也称死循环,永不终止的循环。
            // 使用do...while语句书写无限循环
            {
                do
                {
                } while (true);
            }
            
            // 使用while语句书写无限循环
            {
                while (true)
                {
                }
            }
            
            // 使用for语句书写无限循环
            {
                for (; ; )
                {
                }
            }
        }
    }
}

分享文章:十九、循环控制之无限循环
本文链接:http://www.tsicrk.com/article/jssdod.html

其他资讯

让你的专属顾问为你服务

1.6988s