Dim ls As new List(Of String)For Each dt As DataTable In DataTables If dt.ConnectionName = "abc" Then ls.add(dt.name) End IfNextFor Each s As String In ls DataTables.Unload(s)Next