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 281 views
1 answer 291 views
1 answer 226 views
1 answer 239 views
1 answer 305 views
1 answer 236 views
1 answer 246 views
...