나는 두 가지 형태로 경로를 검색하는 코드를 가지고 있습니다. 한 양식에서 파일을 열고 처리 할 경로를 선택하면 다른 양식으로 돌아갈 때 Direcotry 예외 오류가 발생합니다. 내가 전화 내 첫 번째 양식에경로가 변경되는 이유
string strFilePath2;
strFilePath2 = Directory.GetCurrentDirectory();
strFilePath2 = Directory.GetParent(strFilePath2).ToString();
strFilePath2 = Directory.GetParent(strFilePath2).ToString();
strFilePath2 = strFilePath2 + "\\ACH";
: 나는이라는 두 번째 양식에서 해당 경로
를 얻기 위해 다른 문자열로 사용 디버깅하는 동안
strFilePath = Directory.GetCurrentDirectory();
strFilePath = Directory.GetParent(strFilePath).ToString();
strFilePath = Directory.GetParent(strFilePath).ToString();
strFilePath = strFilePath + "\\ACH\\" + Node;
, 내가 선택한 얻고있다 두 번째 형식의 경로는 아니지만 예상 한 경로는 아닙니다. 왜 아무 한테 말해 줄 수 있니?
질문에 예외를 넣으십시오. –