Public Function GetFileContentvalue(ByVal Path As String) As String Dim FileStream As New StreamReader(Path)<--- Dim sFileText As String = String.Empty Try 'Read file and load all its content to the string sFileText = FileStream.ReadToEnd() Return sFileText Catch ex As Exception message.show("File exception") Finally If FileStream IsNot Nothing Then FileStream.Close() End If End Try Return sFileText End Function
sconfigText = GetFileContent(sFilePath)
GetFileContentvalue
Public Function GetFileContentvalue(ByVal Path As String) As String Try Return File.ReadAllText(Path) Catch ex As Exception message.show("File exception") Return String.Empty End Try End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)