C#/WPF_예제소스
[C#] 파일경로 설정
딸기우유중독
2022. 3. 29. 18:01
string filename = "C:\\Temp\\1.txt";
// @심벌을 사용하여 보다 자연스럽게 패스 지정
string filename = @"C:\Temp\1.txt";
https://www.csharpstudy.com/Tip/Tip-at-symbol.aspx
C#에서 @을 사용할 때 - C# 프로그래밍 배우기 (Learn C# Programming)
@ 심벌을 사용법 1 @ 심벌을 문자열 앞에 사용하면, 해당 문자열 안의 Escape 문자를 무시하고 문자 그대로 인식하도록 한다. 예를 들어, 파일 패스를 지정할 때, Backslash를 한번 지정하면 이는 Escape
www.csharpstudy.com
#현재 실행파일 경로
using System;
string path = System.IO.Directory.GetCurrentDirectory();
728x90