How can i build function that can receive DatagridView.Rows or Datagridview.SelectedRows?
<p>The function must support two case 
first case, it can receive All rows in the datagridview.
and Second case, It can receive only selected rows.</p>

<pre><code>   If Case_A Then 

        PrintLabel(dtg.SelectedRows)
  End If

  If Case_B Then
        PrintLabel(dtg.Rows)
  End If
</code></pre>

<p>Function PrinLabel may be something like these</p>

<pre><code>   Public Function PrintLabel(ByVal dtgvNeedPrint As DataGridViewRowCollection) As Boolean

      For Each dtgRow As DataGridViewRow In dtgvNeedPrint
         ''// Do something.
      End 

    End Function
</code></pre>

<p>But it's error.Because of  <strong>dtg.SelectedRows</strong> isn't <strong>DataGridViewRowCollection</strong>. Type isn't matches.</p>