title: How can I pass multiple cell values of datagridview from one form to another at same time in C#?
body: <p>I am new to c# and I am using windows forms.
  I have <code>Form1</code> with <code>datagridview</code> and <code>Form2</code> with a map on it.</p>
  
  <p>I want to pass unknown number (unlimited number) of <code>datagridview</code> cell values from <code>Form1</code> to <code>form2</code> at same time, that is because I want to show the selected cell values (addresses) of <code>form1</code> into <code>form2</code> on the map.
  I know how to use setters and getters but in this case I think setters and getters will not work because the number of cell values I want to pass to <code>form2</code>  is unknown.</p>
  
  <p>Anyone knows how can I pass multiple <code>datagridview</code> cell values from <code>form1</code> to <code>form2</code> at same time? Please help, Thank you</p>
  
  <p>This code in Form1 loops through all the selected rows and I want to pass
  <code>Cells[0].Value</code> to <code>form2</code>:</p>
  
  <pre><code> foreach (DataGridViewRow row in DGV.SelectedRows)
   {
      // here I have to pass all selected row.Cells[0].Value to form2         
   }
  </code></pre>