我想将一些文本框保存到文本文件中
See Picture
我可以组合文本框中的文本并保存吗?
答案 0 :(得分:1)
您可以使用下面提供的示例代码
Dim filepath As String = IO.Path.Combine("D:\", "somefile.txt") 'Some file path
Using sw As New StreamWriter(filepath)
sw.Write(TextBox1.Text)
sw.WriteLine(" " & TextBox2.Text)
sw.Write(TextBox3.Text)
sw.WriteLine(" " & TextBox4.Text)
'
'and so on
'
End Using