foreach



If you are iterating through anything that is not a collection you should always use a for loop. It is a lot more efficient than a foreach loop.

foreach (System.Windows.Forms.DataGridViewRow objRow in objDataGridView.Rows) 
{

}

Dim objRow As System.Windows.Forms.DataGridViewRow 
For Each objRow In objDataGridView.Rows

Next objRow


© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext