title: Multidimensional Array Homework
body: <p>I have a textbox called txtBox1, a second textbox called txtbox2, a Label and a Button. I need to create a function that </p>
  
  <ol>
  <li>accepts 2 integer parameters and returns a string.  </li>
  <li>creates a 2 dimensional array based on the integers passed in those parameters.  The first integer parameter will represent txtbox1, the second integer parameter will represent txtbox2.</li>
  <li>use nested for loops to fill the array elements with incrementing values starting at 1  </li>
  <li><p>As part of your looping structure, keep track of all element values in a string variable and separate them with a comma.  For example, if the user enters 3 in txtbox1 and 5 in txtbox2 and clicks the button, we would get an array like so:</p>
  
  <pre><code>:Length=15
  (0,0): 1    
  (0,1): 2
  (0,2): 3
  (0,3): 4
  (0,4): 5
  (1,0): 6
  (1,1): 7
  (1,2): 8
  (1,3): 9
  (1,4): 10 
  (2,0): 11
  (2,1): 12
  (2,2): 13
  (2,3): 14
  (2,4): 15    
  </code></pre>
  
  <p>And the values populated in the elements would be 1,2,3,4,5,6,7,8,9,10,11,12,13,14 and 15.</p></li>
  <li>The string passed back will be in the format “array is 3 x 5 and the values in the array elements are 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15”.  </li>
  <li>Populate the Label with this string value.  </li>
  </ol>
  
  <p>Here is what I have so far...</p>
  
  <pre><code>Shared Function myArray(int1 As Integer, int2 As Integer) As String
  
      Dim Array(int1 - 1, int2 - 1) As Integer
      Dim i As Integer
      Dim j As Integer
      Dim counter As Integer = 1
  
      For i = 0 To int1 - 1
          For j = 0 To int2 - 1
              Array(i, j) = counter
              counter += 1
          Next
      Next
  
      Return Array(i, j)
  
  End Function
  </code></pre>