KO CSharp Keyword long - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
ะฃะบัะฐัะฝััะบะฐ ยท ะ ัััะบะธะน ยท English ยท Deutsch ยท Franรงais ยท Italiano ยท Espaรฑol ยท ็น้ซไธญๆ ยท ๆฅๆฌ่ช ยท ํ๊ตญ์ด
C#: long
ํธ๋๋ถ C# ยท ์ค์ฉ ๊ฐ์ด๋
๋ถํธ ์๋ 64๋นํธ ์ ์์ ๋๋ค.
๊ฐ๋จํ ์์ (Example.cs)
์ด ์์ ๋ฅผ Example.cs๋ก ๋ฐ๋ก ์ ์ฅํ๊ณ ์ด ํ์ด์ง์ ๋ค๋ฅธ ์์ ์ ๋
๋ฆฝ์ ์ผ๋ก ์คํํ์ธ์.
Example.cs:
// PROJECT-EXAMPLE
long amount = 12L;
System.Console.WriteLine(amount + 2);
๊ฒฐ๊ณผ:
14
ํต์ฌ๋ก
long value = 120L;
๋ณ์์ ์ ํ์ ๋ฐ๋ผ ์ฐ์ ์ ๋ฒ์์ ๊ท์น์ด ๊ฒฐ์ ๋ฉ๋๋ค. ์ ์์ ์ค๋ฒํ๋ก๋ฅผ ํ์ธํ๋ ค๋ฉด selected๋ฅผ ์ฌ์ฉํ์ธ์. ํ ์คํธ ๋ณํ โ TryParse.
์์ 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)
{
long first = 120L;
long second = 2;
Console.WriteLine(first + second);
}
}
์ 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)
{
long[] values = [120L, 2, 3];
foreach (long value in values) Console.WriteLine(value);
Console.WriteLine(long.MaxValue);
}
}
๊ณต์ ์ถ์ฒ: Microsoft ํ์ต.