Which code is more efficient?
Dim drPerson As DataRow
Dim cCLS as new myClass
For Each drPerson In dtData.Rows
Dim dsPers As New DataSet
dsPers = cCLS.Get_PersonByID(drPerson("person_id"))
' Code block goes here to do something with dataset object
Next
or
Dim drPerson As DataRow
Dim dsPers As New DataSet
Dim cCLS as new myClass
For Each drPerson In dtData.Rows
dsPers = cCLS.Get_PersonByID(drPerson("person_id"))
' Code block goes here to do something with dataset object
Next