G
Guest
hello again...
My problem i gess is this: i can read the bytes from the file, but i don´t
know how to convert it to the array.
See small example and say me something if is possible:
Public Structure CLIENTS
Public codint As Short
<VBFixedString(15)> Public CODCLi As String
<VBFixedString(50)> Public Nome As String
end structure
Private Sub Button1_Click(etc)
Const fileName As String = "clibas.dat"
Dim DATAD As New CLIENTS
Dim fileStream As FileStream = New FileStream(fileName, FileMode.Open)
fileStream.SetLength(68)
fileStream.Seek(0, SeekOrigin.Begin)
For i As Integer = 0 To 68
' HERE IS THE PROBLEM
DATAD = Convert.ToChar(fileStream.ReadByte())
Next i
fileStream.Close()
end sub
can i have some help on passing this bytes to the array?
many thanks
Luis
My problem i gess is this: i can read the bytes from the file, but i don´t
know how to convert it to the array.
See small example and say me something if is possible:
Public Structure CLIENTS
Public codint As Short
<VBFixedString(15)> Public CODCLi As String
<VBFixedString(50)> Public Nome As String
end structure
Private Sub Button1_Click(etc)
Const fileName As String = "clibas.dat"
Dim DATAD As New CLIENTS
Dim fileStream As FileStream = New FileStream(fileName, FileMode.Open)
fileStream.SetLength(68)
fileStream.Seek(0, SeekOrigin.Begin)
For i As Integer = 0 To 68
' HERE IS THE PROBLEM
DATAD = Convert.ToChar(fileStream.ReadByte())
Next i
fileStream.Close()
end sub
can i have some help on passing this bytes to the array?
many thanks
Luis