.NET Framework는 원래 Microsoft에서 설계 한 라이브러리 및 런타임 집합입니다. 모든 .NET 프로그램은 MSIL (Microsoft Intermediate Language)이라는 바이트 코드로 컴파일됩니다. MSIL은 공용 언어 런타임 (CLR)에 의해 실행됩니다.
아래에는 .NET Framework를 지원하는 다양한 언어로 된 "Hello World"의 몇 가지 예제가 있습니다. "Hello World"는 디스플레이 장치에 "Hello World"를 표시하는 프로그램입니다. 작업 프로그램을 작성하기위한 기본 구문을 보여주는 데 사용됩니다. 또한 언어 컴파일러, 개발 환경 및 런타임 환경이 모두 올바르게 작동하는지 확인하기 위해 온 전성 테스트로 사용할 수 있습니다.
번역 | 출시일 |
---|---|
1.0 | 2002-02-13 |
1.1 | 2003-04-24 |
2.0 | 2005-11-07 |
3.0 | 2006-11-06 |
3.5 | 2007-11-19 |
3.5 SP1 | 2008-08-11 |
4.0 | 2010-04-12 |
4.5 | 2012-08-15 |
4.5.1 | 2013-10-17 |
4.5.2 | 2014-05-05 |
4.6 | 2015-07-20 |
4.6.1 | 2015-11-17 |
4.6.2 | 2016-08-02 |
4.7 | 2017-04-05 |
번역 | 출시일 |
---|---|
1.0 | 2000-01-01 |
2.0 | 2005-10-01 |
3.5 | 2007-11-19 |
3.7 | 2009-01-01 |
3.9 | 2013-06-01 |
번역 | 출시일 |
---|---|
4.2 | 2011-10-04 |
4.3 | 2012-12-04 |
4.4 | 2015-10-20 |
print "Hello World"
using System;
class Program
{
// The Main() function is the first function to be executed in a program
static void Main()
{
// Write the string "Hello World to the standard out
Console.WriteLine("Hello World");
}
}
Console.WriteLine
에는 몇 가지 오버로드가 있습니다. 이 경우 문자열 "Hello World"가 매개 변수이며 실행 중에 표준 출력 스트림에 "Hello World"를 출력합니다. 다른 오버로드는 스트림에 쓰 기 전에 인수의 .ToString
을 호출 할 수 있습니다. 자세한 내용은 .NET Framework 설명서 를 참조하십시오.
using namespace System;
int main(array<String^>^ args)
{
Console::WriteLine("Hello World");
}
open System
[<EntryPoint>]
let main argv =
printfn "Hello World"
0
.class public auto ansi beforefieldinit Program
extends [mscorlib]System.Object
{
.method public hidebysig static void Main() cil managed
{
.maxstack 8
IL_0000: nop
IL_0001: ldstr "Hello World"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}
System.Console.WriteLine("Hello World");
namespace HelloWorld;
interface
type
App = class
public
class method Main(args: array of String);
end;
implementation
class method App.Main(args: array of String);
begin
Console.WriteLine('Hello World');
end;
end.
Write-Host "Hello World"
print "Hello World"
import clr
from System import Console
Console.WriteLine("Hello World")
Imports System
Module Program
Public Sub Main()
Console.WriteLine("Hello World")
End Sub
End Module