[이스케이프 시퀀스]
1. 이스케이프 시퀀스
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | using System; class Program { static void Main() { //& 새 줄 (New Line) string newLine = "첫 번째 줄\n두 번째 줄"; Console.WriteLine(newLine); //& 탭 (Tab) string withTab = "첫 번째 열\t두 번째 열"; Console.WriteLine(withTab); //& 역 슬래시 (Backslash) string withBackslash = "역 슬래시는 이렇게 표현됩니다: \\"; Console.WriteLine(withBackslash); //& 큰 따옴표 (Double Quote) string withQuotes = "큰 따옴표는 이렇게 표현됩니다: \"\""; Console.WriteLine(withQuotes); //& 유니코드 문자 (Unicode Characters) string unicodeExample = "유니코드 문자는 이렇게 표현됩니다: \u2022"; Console.WriteLine(unicodeExample); //& 리터럴 문자열 (Verbatim String Literal) string path = @"C:\사용자\이름\문서"; Console.WriteLine(path); } } | cs |
728x90
'프로그래밍 > C#' 카테고리의 다른 글
C#] 데이터 형식 (1) | 2024.01.10 |
---|---|
C#] 상수 (1) | 2024.01.10 |
C#] 변수 (1) | 2024.01.10 |
C#] 출력문 (0) | 2023.12.23 |
C#] C#프로그래밍 언어 (0) | 2023.12.15 |