十九、循环控制之无限循环-成都快上网建站

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

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://kswjz.com/article/jssdod.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流