2019. 9. 15. 19:11ㆍC#
[C#] 1. Visual Studio 2019 설치하고 Hello World 찍기
1. Visual Studio 2019 설치
Microsoft의 IDE , Visual Studio를 설치하러 비주얼스튜디오 홈페이지로 간다.
https://visualstudio.microsoft.com/
홈페이지에 들어가게 되면 아래와 같은 화면에서, Visual Studio 2019 Community Edition 을 설치하기 바란다.
설치가 완료되었다면 Visual Stuido를 실행시킨뒤, 새 프로젝트 만들기 > 'C# 콘솔 앱'을 생성하자. 필자는 프로젝트 이름을 ConsoleApp3로 하겠다.
생성이 완료되었으면 아래와 같은 코드가 반길 것 이다.
1. Hello World
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace ConsoleApp3 { class Program { static void Main(string[] args) { } } } |
거의 모든 컴파일 언어가 그렇듯이 Main함수가 프로그램의 첫 시작이다.
Main함수안에 콘솔 출력함수를 이용하여서 Hello World를 출력해보자.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace ConsoleApp3 { class Program { static void Main(string[] args) { Console.WriteLine("Hello World"); } } } |
F5를 눌러서 디버깅을 시작하거나, Control + F5를 눌러서 디버깅하지않고 시작해보자.
결과는 아래와 같이 Hello World가 콘솔창에 찍힌것을 볼 수 있다.
끗
'C#' 카테고리의 다른 글
ToList에 대한 오해 (0) | 2022.06.16 |
---|---|
C# SQLite 사용 - 테이블 생성 (0) | 2021.02.22 |
[WPF] Designer 뷰에서와, 디버깅에서의 Height, Width 차이 해결하기 (0) | 2020.11.22 |
How to implement a Color Picker by C# in WPF (0) | 2020.06.28 |