All im trying to do is make this function to return how many lines are in the log file. I had this working perfect in vb6 and had some NIMROD idea to try and learn some .NET and now im sort of stuck on it.
This is what Ive come up with so far but all that happens is it seems to loop forever.
VB Code:
Public Function LogSize(ByVal pLog As String) As Long Dim x As Long Dim sTmp As String Dim oFile As New System.IO.FileStream(pLog, IO.FileMode.Open) Dim oRead As New System.IO.StreamReader(oFile) Do While oRead.Read sTmp = oRead.ReadLine x = x + 1 Loop LogSize = x oRead.Close() End Function
Thanks for looking




Reply With Quote