請輸入專案類型(網站專案或者應用程式專案):
Dim reader As System.I.Directoryo.StreamReader
Dim line As String = Nothing
Dim value As String()
Dim db = New DataTable()
Dim dv = new DataView()
With System.Io.Directory.GetFileSystemEntries("D:\省略")
ShowLog("TotalFile:",.Length)
For j =0 To .Length-1
ShowLog("Files:",j+1,"/",.Length)
Dim fname As String=.GetValue(j)
reader = New System.IO.StreamReader(fname)
Do while reader.peek()<> -1
line =reader.Readline()
line =line.TriEnd()
value =line.spilt(",")'跑到一半會跳出System.outofMemory錯誤
if value.Length >4 And line.Contains("Time")
dt.Rows.Add(value(0),value(1),value(2),value(3))
End if
Loop
End with
(一)因為同之程式我有跑另外一個資料夾檔案過,改的地方只有取的一些規則而已
可以順利跑完,雖然檔案數跟裡面內容有差異。
(二)有甚麼寫法能解決方法嗎?