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 ํ์ต.