Public Class MainClass
Public Shared Function ReadTextFromFile(ByVal Filename As String) As String
Dim strFileText As String
Dim MyReader As System.IO.StreamReader = System.IO.File.OpenText(Filename)
strFileText = MyReader.ReadToEnd
MyReader.Close()
Return strFileText
End Function
Public Shared Sub WriteTextToFile(ByVal Filename As String, ByVal Text As String)
Dim MyWriter As System.IO.StreamWriter = System.IO.File.CreateText(Filename)
MyWriter.Write(Text)
MyWriter.Close()
End Sub
Public Shared Sub Main
WriteTextToFile("c:\b.txt", ReadTextFromFile("c:\a.txt"))
End Sub
End Class