Dim i = 2
Do While True
i += 1
If IsDBNull(TmDataSet.T.Rows(0)(i)) = True Then Exit Do
Dim new_t As New train
new_t.id = TmDataS
This is the code I used
Dim deepCopies = _dictOfBalances1.Keys.ToList
Basically deepCopies is a deep copy of _dictOfBalances1.Keys
This code won't work if deepCopies are shallow copies.
For Each code In deepCopies
If allthecoincode.Contains(code) Then
Else
_dictOfBalances1.Remove(code)
'deletedKeys.Add(code)
End If
Next