Mega Code Archive

 
Categories / VB.Net / File Directory
 

Save character to a file

Imports System.IO Imports System.Text Module Example    Public Sub Main()       Dim rnd As New Random()       Dim str As String = String.Empty       Dim sw As New StreamWriter("StringFile.txt", False, Encoding.Unicode)       For ctr As Integer = 0 To 10          str += ChrW(rnd.Next(1, &h0530))           If str.Length Mod 60 = 0 Then str += vbCrLf                 Next                           sw.Write(str)       sw.Close()    End Sub End Module