Thanks Aaron....
But I want to also attempt in using this method other than streamreader class. Here's what I've been playing with....
VB Code:
Private Const OutPut As Integer = 1 Public Structure AboutFoods Dim Color as String Dim Food as String End Structure Private Sub Process(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles .... Dim strFoods As New String(" "c, 10) FileOpen(1, foodfile.BIN, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared) 'Open .BIN file Do While Not EOF(1) FileGet(1, strFoods) 'Read thru each 10 bytes '**How do you load Color and Food into AboutFoods.Color and 'AboutFoods.Food, and be able to access each item in array... 'or should I read 20 bytes each time, and split each record '10 bytes to get Color and Food? Loop End Sub
And I'd want to be able to get # of records read in binary file, and each item in structure array.....
Thanks again...




Reply With Quote