I have a DataSet where I need to find out how many rows has been changed using the following code:
dataTable1 = dataSet1.Tables[\"FooTable\"].Ge
As from MSDN for GetChanges
A filtered copy of the DataTable that can have actions performed on it, and later be merged back in the DataTable using Merge. If no rows of the desired DataRowState are found, the method returns Nothing (null).
dataTable1 is null so just check before you iterate over it.