Console.ReadLine()1 [C#] 기본 입력 Console.ReadLine() 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); } } } 2023. 2. 25. 이전 1 다음 728x90