문서는 말한다 Creates a new file
을하고 예외에가 나열File.WriteAllText는 실제로 FileNotFoundException을 던집니까?</p> <pre><code>// Summary: // Creates a new file, writes the specified string to the file, and then closes // the file. If the target file already exists, it is overwritten. </code></pre> <p>첫 번째 줄, 첫 번째 문장 :
// System.IO.FileNotFoundException:
// The file specified in path was not found.
경우에 이런 일이까요? 항상 파일을 생성하면 FileNotFoundException을 throw해서는 안됩니다 ...
설명서가 잘못 되었습니까? 아니면 <remarks>
태그가 누락 되었습니까?
경로의 일부가 없으면 어떻게 될까요? 그것은'FileNotFoundException' 또는'DirectoryNotFound'일까요? –
@JohnSaunders는'DirectoryNotFoundException'입니다 :'{ "경로 'C : \\ ZZZZZZ \\ ZZZ \\ TEST.txt'의 일부를 찾을 수 없습니다."}' – BrunoLM
이것은 복사 - 붙여 넣기 버그입니다. File.ReadAllText() 문서. –