Question Two dimensional string array problem............

Poornimapriya

Member
Joined
Feb 8, 2011
Messages
8
Location
Chennai, Tamil Nadu, India
Programming Experience
Beginner
Hey guys,
I have a code block as follows
Private Sub btnOpn_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpn.Click
Dim log(12)() As String
Dim i As Integer = 0
Dim i1 As Integer = 0
Dim di As New IO.DirectoryInfo("F:\Tsunami buoy\Log files")
Dim aryFi As IO.FileInfo() = di.GetFiles("*.log")
Dim fi As IO.FileInfo
For Each fi In aryFi
Dim oRead As System.IO.StreamReader, LineIn As String, bprno As Char, buoyid As Char, path1 As Char
oRead = File.OpenText(fi.FullName)
While oRead.Peek <> -1
LineIn = oRead.ReadToEnd()
log(i)(0) = LineIn.Substring(LineIn.IndexOf("BPR SERIAL NUMBER: ") + 19, 4)
log(i)(1) = LineIn.Substring(LineIn.IndexOf("BUOY ID: ") + 9, 4)
log(i)(2) = (LineIn.Substring(LineIn.IndexOf("PATH TO STORE THE DATA IN THE EXCEL SHEET WAS: ") + 47))
End While
i = i + 1
Next
End Sub
.......
HEre I am facing a problem tht,

value of type 1 dimensional array of string cannot be converted into string
In this i am gng to open the files stored in the F:\Tsunami buoy\ Log Files with extension .log, and with the information available in the log files, we are gng to process the file and extract and use it in the other one.. Please help me....
 
Back
Top