Tags
- postman collection variables
- UI/UX Engineer
- web developer
- postman automations
- Interaction developer
- 우수한 프런트 개발자
- postman tests
- LSL_Script
- postman collection
- solidity
- 프런트엔드
- C++
- oracle
- postman excel
- 좋은 개발자
- Android
- Front-end developer
- postman html parse
- postman pre-request
- postman csv
- emplace_back
- Unity
- postman
- postman session
- Java
- MFC
- c#
- 다빈치 리졸브
- Android/iOS Developer
- Intellij
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Archives
- Today
- Total
david's daily developer note
C# 현재 프로젝트 디렉토리 경로 가져오기. 본문
728x90
응용 프로그램이 개발된 환경에서, 특정 경로의 파일을 참조하게 되어있다면,
실행될 환경에서도 해당 파일을 문제없이 참조하게 고려해야한다.
보통 log파일이나, 유저 정의 파일시스템, 기타 파일등이 있겠다. 아래는 현재 프로젝트 폴더의 경로를 가져오는 방법이다.
String currentPath = Environment.CurrentDirectory;
Console.WriteLine(currentPath);
Encoding euckrEncode = Encoding.GetEncoding("euc-kr");
StreamReader sr = new StreamReader(currentPath + "\\test.txt", euckrEncode);
728x90
'[Develop] Language > C#' 카테고리의 다른 글
C# 쓰레드, 임계 영역 처리. (0) | 2011.01.19 |
---|---|
C# 다수의 Process 실행하기. 경로 관리 (0) | 2011.01.19 |
C# String Format for Double (0) | 2011.01.18 |
C# Using 문의 try/catch 확장 (0) | 2011.01.03 |
C# 다수의 버튼 컨트롤을 동적으로 생성 및 버튼 이동시키는 이벤트 추가하기 (2) | 2010.12.29 |