언어/[C#]
[C#] 기본 입력 Console.ReadLine()
조랩
2023. 2. 25. 21:55
using System;
using System.Runtime.InteropServices;
namespace MyFirstProgram
{
internal class Program
{
static void Main(string[] args) // main method
{
// 기본적으로 string으로 입력됨
// int, double, boolean, char 등으로 사용하기 위해서는 타입캐스팅이 필요함
string example = Console.ReadLine();
Console.WriteLine(example);
}
}
}
728x90