I need to run some code in Visual Basic that is the equivalent to this in C#:
for(var item in removeRows)
{
two.ImportRow(item);
}
I know that the closest you can come to declaring "var" in VB is basically
Dim something =
However, how would you do this in a foreach loop?
You would just use:
For Each item In removeRows
two.ImportRow(item)
Next
The As datatype
specification in VB is optional. See For Each documentation for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With