Import Statements
Import System.IO
Function
Private Function SaveTextToFile(ByVal strContent As String, ByVal strFileName As String) As String Dim swWriter As New StreamWriter(strFileName) swWriter.Write(strContent) swWriter.Close() Return (strContent) End Function
Usage
SaveTextToFile("Hello", "Test.txt")
Edited by brarei200, 15 January 2011 - 10:42 AM.