목록2024/09 (18)
충분히 쌓여가는
Console: 콘솔은 컴퓨터에 연결되어 시스템의 상황을 모니터하는데 사용되는 터미널을 의미하는 것으로,보통 모니터와 키보드가 조합된 장치를 말한다 콘솔 앱: System.Console 클래스를 사용하여 콘솔로부터 문자를 읽거나 콘솔에 문자를 출력할 수 있다콘솔의 데이터는 표준 입력 스트림에서 읽혀지고, 표준 출력 스트림으로 쓰여지며, 콘솔의 오류 데이터는 표준 오류 출력 스트림으로 쓰여진다이러한 스트림은 응용 프로그램이 시작될 때 콘솔과 자동으로 연결되며 In, Out 및 Error 속성으로 나타난다 콘솔이 존재하지 않는 경우: 그래픽 응용 프로그램과 같이 Windows 기반 응용 프로그램 내에 콘솔이 존재하지 않을 경우정보를 쓸 콘솔이 없으므로 표준 출력 스트림에 쓰여지는 출력은 보이지 않는다 콘솔 ..
1. 콘솔 앱 선택, 프로젝트 이름 설정 2. Program.cs 생성 코드 분석using System;namespace A002_HelloWorld{ class Program { static void Main(string[] args) { Console.WriteLine("Hello, World"); } }}System 네임스페이스: 소스 창에 System외에 4개의 네임스페이스가 using문에 포함되어 있지만 Console.WriteLine()을 위해 System 네이스페이만 남겨 둠 Program 클래스: C#은 필드나 메서드 등의 프로그램 구성요소들이 반드시 클래스 안에 있어야 한다 Main() 메소드: 프로그램의 진입점..