Create StringWriter class that writes to the specified StringBuilder.
Imports System
Imports System.IO
Imports System.Text
Public Class StrWriter
Shared Sub Main()
Dim strBuilder As New StringBuilder("file path characters are: ")
Dim strWriter As New StringWriter(strBuilder)
strWriter.Write(Path.InvalidPathChars, 0, Path.InvalidPathChars.Length)
strWriter.Close()
strBuilder.Insert(0, "Invalid ")
Console.WriteLine(strWriter.ToString())
End Sub
End Class
Related examples in the same category