네임스페이스.클래스.메서드();
-Fully Qualified Names(정규화된 이름): 네임스페이스 이름, 형식 이름 전체를 지정
class UsingDemo
{
static void Main()
{
System.Console.WriteLine("Hello World");
}
}
using 구문
클래스.메서드();
using System;
class UsingDemo
{
static void Main()
{
Console.WriteLine("Hello World");
}
}
using static System.Console;
class UsingDemo
{
static void Main()
{
WriteLine("Hello World");
}
}
svm + Tab Tab
static void Main(string[] args) { }
cw + Tab Tab ( using System을 자주 쓰게 될 것? )
Console.WriteLine();
Console.WriteLine() != console.writeline()
Console.WriteLine("{0}", "Hello, C#"); Console.WriteLine("{0}, {0}", "Hello, C#"); Console.WriteLine("{0}, {1}", "Hello", "C#"); Console.WriteLine("{0}, {1}", "하나만 넘겨주면"); Console.WriteLine("{1}, {0}", "Hello", "C#");
Hello, C#
Hello, C#, Hello, C#
Hello, C#
error: 0에서 시작하는 인덱스는 0보다 크거나 같아야 하며 인수 목록의 크기보다 작아야 합니다.
C#, Hello