How to writes data to a text file using StreamWriter in VB.NET

1 Answer

0 votes
Imports System.IO

Module Module1

    Sub Main()

        Using writer As StreamWriter = New StreamWriter("d:\\file.txt")
            writer.Write("VB.NET ")
            writer.WriteLine("Programming language")
            writer.WriteLine("in the .NET")
            writer.WriteLine("Framework")
        End Using

    End Sub


    ' run:
    ' 
    ' VB.NET Programming language
    ' in the .NET
    ' Framework

End Module



answered Mar 30, 2015 by avibootz

Related questions

...