|
이 문서는 기계로 번역한 것입니다. 원본 텍스트를 보려면 포인터를 문서의 문장 위로 올리십시오. 추가 정보
|
번역
원본
|
방법: Visual Basic에서 파일 만들기
Imports System Imports System.IO Imports System.Text Module Module1 Sub Main() Dim path As String = "c:\temp\MyTest.txt" ' Create or overwrite the file. Dim fs As FileStream = File.Create(path) ' Add text to the file. Dim info As Byte() = New UTF8Encoding(True).GetBytes("This is some text in the file.") fs.Write(info, 0, info.Length) fs.Close() End Sub End Module
-
경로 이름의 형식이 잘못된 경우. 예를 들어, 파일 이름에 잘못된 문자가 들어 있거나 파일 이름이 공백인 경우(ArgumentException) -
경로가 읽기 전용인 경우(IOException) -
경로 이름이 Nothing인 경우(ArgumentNullException) -
경로 이름이 너무 긴 경우(PathTooLongException) -
경로가 잘못된 경우(DirectoryNotFoundException) -
경로가 콜론 ":"인 경우(NotSupportedException)