|

VB.NET Programming Examples: Email, Encryption, Zip, HTTP, XML, FTP
Chilkat Software Components
Load utf-8 Text File and Display in Text Box
Back
VB.NET sample code showing how to load a utf-8 text file and display it in a text box.
' Load a utf-8 text file into a string and display it.
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim sr As New StreamReader("myUtf8.txt", System.Text.Encoding.UTF8)
TextBox1.Text = sr.ReadToEnd()
sr.Close()
End Sub
|