Multi-Dimensional Arrays in VB.NET HELP!

Hello, I’m trying to fill a Multi-Dimensional Array and then fill the textboxes with the data.
The array has 10 rows and 2 coloms. On the left colom I want the textboxes to show the numbers 1-10 and
in the right colom i want the the number on the left colom squared. I’m lost.

Code follows:

Code:
'// Populating Array…
Dim sq(10, 2) As Integer
Dim i, j As Integer

            For i = 0 To 9 
                For j = 0 To 1 
                        If j = 0 Then 
                            sq(i, j) = i 
                                    ElseIf j = 1 Then 
                             sq(i, j) = i * i 
                        End If 
                Next 
    Next 

'// Get values from Array put in TB... 
    Dim l As Integer '= 1 
    Dim obj As Object 
    Dim objtext As TextBox 
    For i = 0 To 9 
        For j = 0 To 1 
            For Each obj In Controls 
                For l = 1 To 20 
                    If TypeOf obj Is TextBox Then 
                        objtext = obj 


                        If objtext.Name = ("TextBox" & l.ToString) Then 
                            obj.text = sq(i, j) 

                        End If 


                    End If 
                Next l 

            Next 

        Next 
    Next 

any suggestions are appreciated.
Thanks

I think this can be cleaned up a little

Code:
Dim sq(9, 1) As Integer
Dim tb() As TextBox = {TextBox1, TextBox2, TextBox3, TextBox4, TextBox5, TextBox6, TextBox7, TextBox8, TextBox9, TextBox10, _
TextBox11, TextBox12, TextBox13, TextBox14, TextBox15, TextBox16, TextBox17, TextBox18, TextBox19, TextBox20}

    Dim i As Integer 

    For i = 0 To 9 
        sq(i, 0) = i + 1 
        sq(i, 1) = (i + 1) * (i + 1) 
        tb(i * 2).Text = sq(i, 0).ToString 
        tb(i + (i + 1)).Text = sq(i, 1).ToString 
    Next i

Note that your array is one to big in both dimensions. Also note that this assumes you have 20 textboxes named as TextBox<x> from 1-20. If that’s not the case, simply replace the Dim tb()… with the correct names.