KO CSharp Keyword do - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki

ะฃะบั€ะฐั—ะฝััŒะบะฐ ยท ะ ัƒััะบะธะน ยท English ยท Deutsch ยท Franรงais ยท Italiano ยท Espaรฑol ยท ็น้ซ”ไธญๆ–‡ ยท ๆ—ฅๆœฌ่ชž ยท ํ•œ๊ตญ์–ด

C#: do

ํ•ธ๋“œ๋ถ C# ยท ์‹ค์šฉ ๊ฐ€์ด๋“œ

์กฐ๊ฑด์ด ํ™•์ธ๋˜๊ธฐ ์ „์— ๋ฃจํ”„ ๋ณธ๋ฌธ์„ ์‹คํ–‰ํ•˜๋ฏ€๋กœ ์ ์–ด๋„ ํ•œ ๋ฒˆ์€ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.

๊ฐ„๋‹จํ•œ ์˜ˆ์ œ (Example.cs)

์ด ์˜ˆ์ œ๋ฅผ Example.cs๋กœ ๋”ฐ๋กœ ์ €์žฅํ•˜๊ณ  ์ด ํŽ˜์ด์ง€์˜ ๋‹ค๋ฅธ ์˜ˆ์ œ์™€ ๋…๋ฆฝ์ ์œผ๋กœ ์‹คํ–‰ํ•˜์„ธ์š”.

Example.cs:

// PROJECT-EXAMPLE
int count = 5;
do { System.Console.WriteLine(count); } while (count < 0);

๊ฒฐ๊ณผ:

5

ํ†ต์‚ฌ๋ก 

do { ... } while (condition);

์˜ˆ์‹œ 1: ๊ธฐ๋ณธ ํ˜•ํƒœ

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.IO;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;

public static class Program
{
    public static async Task Main(string[] args)
    {
        int count = 0;
        do { Console.WriteLine(count++); } while (count < 3);
    }
}

์˜ˆ 2: ๋˜ ๋‹ค๋ฅธ ์‹ค์ œ ํ˜•์‹

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.IO;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;

public static class Program
{
    public static async Task Main(string[] args)
    {
        int value = 20;
        do { value /= 2; Console.WriteLine(value); } while (value > 3);
    }
}

๊ณต์‹ ์ถœ์ฒ˜: Microsoft ํ•™์Šต.