' FileToStr() VFP equivalent ' expC1 File name Public Function FileToStr(ByVal tcFileName As String) As String Dim lcString As String = "" Dim loFile As IO.StreamReader Try loFile = New IO.StreamReader(tcFileName, True) lcString = loFile.ReadToEnd() loFile.Close() Catch loError As Exception ' Get the proper definition as per the current scope If oProcess Is Nothing Then oApp.ErrorSetup(loError) Else oProcess.ErrorSetup(loError) End If End Try Return lcString End FunctionI was wondering if there could be a good mechanism to have this FileToStr() method to retry or wait or something like that which would make it more solid. Basically, I wouldn't want to retry indefinitely. Maybe just one or two seconds. But, before using that approach, I was wondering if there would be something in regards to the StreamReader() that could help me.