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 410 views
1 answer 390 views
1 answer 322 views
1 answer 339 views
1 answer 420 views
1 answer 325 views
1 answer 346 views
...