KO CSharp Operator Interpolation - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki

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

ํ–‰ ํ˜•ํƒœ

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

๋ณด๊ฐ„์€ ๋ฌธ์ž์—ด์˜ ์‚ฝ์ž…์„ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค. ๋ฌธ์ž ๊ทธ๋Œ€๋กœ ๋ฐฑ์Šฌ๋ž˜์‹œ๋ฅผ ์œ ์ง€ํ•ฉ๋‹ˆ๋‹ค. raw-literal์€ ์ค‘์ฒฉ๋œ ๋”ฐ์˜ดํ‘œ์™€ ์—ฌ๋Ÿฌ ์ค„์˜ ํ…์ŠคํŠธ๋ฅผ ์šฉ์ดํ•˜๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค.

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

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

Example.cs:

// PROJECT-EXAMPLE
int count = 3;
System.Console.WriteLine($"Count={count}");

๊ฒฐ๊ณผ:

Count=3

ํ†ต์‚ฌ๋ก 

$"{value:format}" / @"text" / """text"""

์˜ˆ์‹œ 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)
    {
        decimal amount = 12.5M;
        string text = $"Amount: {amount:F2}";
        Console.WriteLine(text);
        Console.WriteLine(@"C:\Scripts\Data");
    }
}

์˜ˆ์‹œ 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)
    {
        string json = """{"name":"ore","count":3}""";
        Console.WriteLine(json);
    }
}

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