Dim Arys As List(Of String()) = DataTables("明细").GetValues("月|材料") '列名用符号|分割 '注意循环变量是字符型数组,所以类型是String(),而不是String For Each s As String() In DataTables("期初").GetValues("月|材料") Dim contains As Boolean = False For Each ary() As String In arys If ary(0) = s(0) AndAlso ary(1) = s(1) Then contains = True Exit For End If Next If contains = False Then arys.add(s) End If Next