📜  将列表框写入文本文件 vb.net - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:53.408000             🧑  作者: Mango

代码示例1
Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click
    If SaveFD.ShowDialog() = DialogResult.OK Then
        Dim sb As New System.Text.StringBuilder()

        For Each o As Object In ListBox1.Items
            sb.AppendLine(o)
        Next

        System.IO.File.WriteAllText("c:\mypath\output.txt", sb.ToString())
    End If
End Sub