How to write String array to a text file in VB.NET

1 Answer

0 votes
Imports System.IO

Module Module1

    Sub Main()

        Dim array As String() = New String() {"C++", "VB.NET", "C#", "Java", "PHP"}

        File.WriteAllLines("d:\data.txt", array)

    End Sub

End Module

' run:
' 

' data.txt
' --------
' C++
' VB.NET
' C#
' Java
' PHP

 



answered Sep 29, 2018 by avibootz

Related questions

2 answers 277 views
1 answer 285 views
1 answer 223 views
1 answer 236 views
1 answer 300 views
1 answer 232 views
1 answer 244 views
...