Vb.net loop value stored to an array
<p>I have the following code which loop through all the cells of the selected row. How to store all the values in an array?</p>

<pre><code>Dim selectedCellCount As Integer = dgvData.GetCellCount(DataGridViewElementStates.Selected)
    Dim RowVal As String
    Dim i As Integer

    For i = 0 To selectedCellCount - 1
        RowVal = dgvData.SelectedCells(i).Value.ToString
    Next i
End Sub
</code></pre>