logo
  • 教程列表
  • SO官方文檔
  • 檔案處理
    • 將資料寫入檔案
    • 閱讀檔案的所有內容
    • 使用 StreamWriter 將行單獨寫入文字檔案
  1. StackOverflow 文件
  2. Visual Basic .NET Language 教程
  3. 檔案處理
  4. 使用 StreamWriter 將行單獨寫入文字檔案

使用 StreamWriter 將行單獨寫入文字檔案

Created: November-22, 2018

Using sw As New System.IO.StreamWriter("path\to\file.txt")
    sw.WriteLine("Hello world")
End Using

當使用 Implements IDisposable 的物件時,建議使用 Using 塊

  • 閱讀檔案的所有內容

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明