Greetings all!!
I'm having trouble finding whether or not I can assign each element of a column (2-dimension array) to a specific member of a structure.
For example, I have set up a two-dimensional array (16 rows, 3 columns). Each column is a different language, and so far i was planning on running a for loop that would assign each of the 16 words(rows) per each of the 3 languages(columns) and haven't found either the proper syntax or whether it is even possible.
In a separate sub I've filled the 2-D array(tr(15,2). Below is the declared structure and incomplete FOR...NEXT.
Thanks.....ArrayJ
Example:
CODE
Dim tr(15, 2) As String
Structure lang
Dim eng() As String
Dim frn() As String
Dim ger() As String
End Structure
Dim lang1 As lang
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblFrench.Click
End Sub
Private Sub btnTranslate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTranslate.Click
For row As Integer = 0 To 15
lang1.eng = tr(row, 0)
Next
Ahhh..... quick edit!
Maybe I shouldn't be so quick to ask next time.
It seems I forgot to add "()" to member.
(ie...)
CODE
For row As Integer = 0 To 15
lang1.eng(row) = tr(row, 0)
lang1.frn(row) = tr(row, 1)
lang1.ger(row) = tr(row, 2)
Next
This post has been edited by arrayJ: 2 Jul, 2009 - 01:45 PM