Z
Zahid
Hi,
I have declared an array holding a custom declared
structure. The structure looks like this:
Private Structure MnuDataFrmFile
Public menuGroup As String
Public ItemDesc As String
Public ItemPrice As Integer
Private PluValue As Integer
Private rgbR As Integer
Private rgbG As Integer
Private rgbB As Integer
Private buttonSize As String
End Structure
Array of Structure:
Dim HoldsAllItems() As MnuDataFrmFile
I want to read out from a file one line at a time. Each
line will populate the structure eaxactly. Currently Im
reading out from the file using:
Dim Item As String
Dim StreamToDisplay As StreamReader
StreamToDisplay = New StreamReader("c:\allitems.txt")
Item = StreamToDisplay.ReadLine()
The problem is that each line is read as a string from
the file. My Structure has differing data types such as
string and integers.
How can I read a line from the file and populate the
Structure with the line split into the elements of the
structure (hence the correct datatypes)?
Urgent, Please help.
Thanks in advance.
I have declared an array holding a custom declared
structure. The structure looks like this:
Private Structure MnuDataFrmFile
Public menuGroup As String
Public ItemDesc As String
Public ItemPrice As Integer
Private PluValue As Integer
Private rgbR As Integer
Private rgbG As Integer
Private rgbB As Integer
Private buttonSize As String
End Structure
Array of Structure:
Dim HoldsAllItems() As MnuDataFrmFile
I want to read out from a file one line at a time. Each
line will populate the structure eaxactly. Currently Im
reading out from the file using:
Dim Item As String
Dim StreamToDisplay As StreamReader
StreamToDisplay = New StreamReader("c:\allitems.txt")
Item = StreamToDisplay.ReadLine()
The problem is that each line is read as a string from
the file. My Structure has differing data types such as
string and integers.
How can I read a line from the file and populate the
Structure with the line split into the elements of the
structure (hence the correct datatypes)?
Urgent, Please help.
Thanks in advance.