xml 구성 파일이 있는지 확인하려고합니다.xml 구성 파일 찾기
파일은 내가
public static bool FileExistsCheck(string filename, string filepath = "")
{
if (filepath.Length == 0)
filepath = Directory.GetCurrentDirectory();
return File.Exists(filepath + "\\" + filename);
}
이
사람이 있는지 확인하는 올바른 방법에 대한 조언을 할 수있는 기존 파일에도 불구하고 false
을 반환을 사용하고있는 이름 MyApp.exe.config
있다 이 파일이 존재하지 않습니까?
http://stackoverflow.com/questions/837488/how-can-i- 응용 프로그램 경로에서 실행중인 콘솔 앱에서 – bryanmac
http://stackoverflow.com/questions/295687/get-path-to-execution-directory-of-windows-forms-application – bryanmac
왜 알 필요가 있니? 아마도 당신이 원하는 것을 성취 할 수있는 또 다른 방법이있을 것입니다. –