I tried this code to remove the selected row in DataGridView but didn't succeed with can you help please?

Code:
 
Dim i As Integer = DataGridView3.SelectedRows.Count
Me.DataGridView3.Rows.RemoveAt(i)