프로그래밍/C#
C# 기본 예제 코드
키위노트
2018. 4. 14. 14:04
C# 기본 예제 코드
1. VisualStudio Community 2017 실행
2. 파일 > 새로 만들기 > 프로젝트 > Visual C# > 콘솔 앱
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloWorld
{
class HelloWorld
{
static void Main(string[] args)
{
Console.WriteLine ("Hello, World!");
}
}
}
디버그 > 디버깅 시작(F5)
명령 프롬프트 창 실행(윈도우+R키 > cmd 입력)
해당 프로젝트내 bin > Debug 폴더로 이동
생성된 .exe 응용프로그램 파일 실행
Hello, World! 출력
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloWorld
{
class HelloWorld
{
static void Main(string[] args)
{
Console.WriteLine ("Hello, {0}!", args[0]);
}
}
}
디버그 > 디버깅 시작(F5)
명령 프롬프트 창 실행(윈도우+R키 > cmd 입력)
해당 프로젝트내 bin > Debug 폴더로 이동
생성된 .exe 응용프로그램 파일 실행
Hello, C# 출력