Create StringWriter class.
Imports Microsoft.VisualBasic
Imports System
Imports System.IO
Imports System.Text
Public Class StrWriter
Shared Sub Main()
Dim strWriter As StringWriter = new StringWriter()
strWriter.Write("file path characters are: ")
strWriter.Write(Path.InvalidPathChars, 0, Path.InvalidPathChars.Length)
strWriter.Write("."C)
strWriter.GetStringBuilder().Insert(0, "Invalid ")
Console.WriteLine(strWriter.Encoding.EncodingName, strWriter.ToString())
End Sub
End Class
Related examples in the same category