Dim cs() As String = {"第一列", "第二列"} Dim ls As new List(Of String) For Each dr As DataRow In DataTables("表A").Select("") For Each c As String In cs If ls.contains(dr(c)) = False Then ls.add(dr(c)) End If Next Next Dim str As String = String.join("|", ls.ToArray) msgbox(str)