현재 exe의 실행 위치 알아내기1 [C#, WPF] 자기 자신의(실행 중인 프로그램)의 실행 경로 가져오는 방법 (실행 위치) * 코드 - 자기 자신(실행 중인 프로그램)의 실행 중인 경로 가져오기 string path = System.Reflection.Assembly.GetExecutingAssembly().Location; Debug.WriteLine(path); // 현재 실행중인 프로그램 명을 포함한 경로 path = System.IO.Path.GetDirectoryName(path); Debug.WriteLine(path); // 현재 실행중인 프로그램의 경로 * 실행 결과 D:\Test\WPF\WPF\bin\Debug\WPF_TEST.exe D:\Test\WPF\WPF\bin\Debug System.Reflection.Assembly.GetExecutingAssembly().Location; 는 현재 이 코드를 실행.. 2021. 3. 6. 이전 1 다음 반응형