As already mentioned, the As Type option is IF if you have the option. I suspect that your project has the output option disabled (which was the default when importing existing projects running in .Net 2.0). Turn the Infer On option at the top of the project file or in the project compilation settings.
Option Infer On '' This works: For Each item In removeRows two.ImportRow(item) Next Option Infer Off '' Requires: For Each item As DataRow In removeRows '' I'm assuming the strong type here. Object will work with Option Strict Off two.ImportRow(item) Next
source share