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

  • 关于我们
  • 免责声明