Use a StringWriter to write into a string
Imports System
Imports System.IO
Imports System.Text
Public Class MainClass
Shared Sub Main()
' Use a StringWriter to write into a string.
Dim string_writer As New StringWriter()
string_writer.WriteLine("www.java2s.com")
string_writer.WriteLine("www.java2s.com")
Console.WriteLine(string_writer.ToString)
End Sub
End Class
Related examples in the same category