Function ReadTextFile(Path As String) As String
Dim fsReader As New System.IO.StreamReader(Path)
Dim ReturnValue = fsReader.ReadToEnd()
fsReader.Close()
Return ReturnValue
End Function
Sub WriteTextFile(Path As String, TextToWrite As String)
Dim fsWriter As New System.IO.StreamWriter(Path)
fsWriter.Write(TextToWrite)
fsWriter.Close()
End Sub
Function ReadTextFile(Path As String) As String
Dim fsReader As New System.IO.StreamReader(Path)
Dim ReturnValue = fsReader.ReadToEnd()
fsReader.Close()
Return ReturnValue
End Function
Function ReadTextFile(Path As String) As String
If IO.File.Exist(Path) = True Then
Dim fsReader As New System.IO.StreamReader(Path)
Dim ReturnValue As String = fsReader.ReadToEnd()
fsReader.Close()
Return ReturnValue
Else
Throw New FileNotFoundException(Path)
End If
End Function
dim objStramReader as streamReader =nothing
dim objStreamWritter as StreamWritter=File.Createtext(FilePath)
dim strLine as String=nothing
objStramReader =new streamReader(file.OpenRead(PathWithFileName))
while(objStramReader.peek<>-1 )
strLine=objStramReader.ReadLine()
objStreamWritter.WriteLine(strLine)
end while
objStreamWritter.Close()
objStramReader .close()