title: Combining two single dimensional arrays in a 2D array in c#
body: <p>I am having two 1D arrays. I want to convert these 2 arrays as single 2D array.</p>
  
  <p>My code is: </p>
  
  <pre><code>public Static void Main()
  {
  int[] arrayRow;
  int[] arrayCol;
    for (int i = 0; i &lt; row; i++)
    {
     for (int j = 0; j &lt; column; j++)
       {
         int[,] myArray = new int[row,column];
         myArray[i,j] = arrayRow[i]; // not possible -- your suggestions           
       }
     }
  for (int i = 0; i &lt; row; i++)
    {
     for (int j = 0; j &lt; column; j++)
       {
         Console.Write(myArray[i,j]);         
       }
     }
  }
  </code></pre>
  
  <p>I need to save <code>arrayRow[]</code> and <code>arrayCol[]</code> in <code>myArray[,]</code>. </p>
  
  <p>For example,</p>
  
  <p>if we have <code>arrayRow[]={1,2,3}</code> and <code>arrayCol[]={4,5,6}</code> then myArray[,]={(1,4),(2,5),(3,6)}</p>
  
  <p>Note: <code>arrayRow</code> and <code>arrayCol</code> may have different lengths. In such cases the element that have no pair should be stored in the new single dimensional array <code>result[]</code>. </p>