c# do循环迭代语句

c# 语言中的迭代就像编程语言中的表达式一样工作。

Do语句执行或者一个包含在{}左大括号和右大括号中的语句块重复它的语句,直到特定表达式不匹配为止。
示例

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication5
{
   public class ABC
   {
        public static void Main()
        {
        int x = 0;
          do
            {
           Console.WriteLine(x);
             x++;
            } while (x < 9);
             Console.ReadLine();             
         }
     }
  }
日期:2020-04-11 23:03:44 来源:oir作者:oir