title: Find a value in an array from row and column index
body: <p>So I have a 5 by 6 two dimensional array(A). From this array(A) i would like to return a value based on the input of row and column by the user. What I have so far...</p>
  
  <pre><code>private int FindValue(int[,] A, int row, int col)
  {
      richTextBox1.Clear();
  
      for (int i = 0; i &lt; row; i++)
      {
          for (int j = 0; j &lt; col; j++)
          {
              if (A[i, j] == A)
              {
                  return A[i, j];
              }
          }
      }
  
      return -1;
  }
  
  private void button3_Click(object sender, EventArgs e)
  {
      int row = int.Parse(textBox1.Text);
      int col = int.Parse(textBox2.Text);
  }
  </code></pre>