KO CSharp Keyword void - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
ะฃะบัะฐัะฝััะบะฐ ยท ะ ัััะบะธะน ยท English ยท Deutsch ยท Franรงais ยท Italiano ยท Espaรฑol ยท ็น้ซไธญๆ ยท ๆฅๆฌ่ช ยท ํ๊ตญ์ด
ํธ๋๋ถ C# ยท ์ค์ฉ ๊ฐ์ด๋
์ด ๋ฉ์๋๋ ๊ฐ์ ๋ฐํํ์ง ์์ต๋๋ค. ํธ์ถ์ ๋ช ๋ น๋ฌธ์ผ๋ก ์ฌ์ฉ๋ฉ๋๋ค. return์ ๊ฒฐ๊ณผ ์์ด ๋ฉ์๋๋ฅผ ์ข ๋ฃํฉ๋๋ค.
์ด ์์ ๋ฅผ Example.cs๋ก ๋ฐ๋ก ์ ์ฅํ๊ณ ์ด ํ์ด์ง์ ๋ค๋ฅธ ์์ ์ ๋
๋ฆฝ์ ์ผ๋ก ์คํํ์ธ์.
Example.cs:
// PROJECT-EXAMPLE
void Report() { System.Console.WriteLine("Ready"); }
Report();๊ฒฐ๊ณผ:
Ready
static void Report(string text) { ... }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)
{
Reports.Show("Ready");
}
}
public static class Reports { public static void Show(string text) { Console.WriteLine(text); } }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)
{
Action<string> writer = Reports.Show;
writer("Finished");
}
}
public static class Reports { public static void Show(string text) { if (text.Length == 0) return; Console.WriteLine(text); } }๊ณต์ ์ถ์ฒ: Microsoft ํ์ต.