Can someone explain this line of code to me please

OzzyxOscar

New member
Joined
Nov 28, 2010
Messages
2
Programming Experience
Beginner
Hello can someone please explain to me how this line of code works. I have to add comments to it for homework , based upon how it works.

The code line :

Me.DataGridCustomers.Rows.Remove(Me.DataGridCustomers.SelectedRows(0))

Thank you for your time.
=]
 
SelectedRows is a collection of all the rows in the grid that are selected, i.e. highlighted.
Rows is a collection of all the rows in the grid.
Just like an array, you index collections to get their items.
Just like an array, collection indexes start at 0.
The Remove method of any collection does exactly what the name suggests.

That should be all the information you need to work out what that line of code is doing.
 
Back
Top