-- 作者:lur320
-- 发布时间:2016/9/16 0:35:00
-- 排除集合内重复值
如下代码
Vals = DataTables("air_shipment").GetValues("FOB_1_Currency|CIF_1_Currency|DDU_1_Currency", "[OriginCountry] is not null") val.AddRange(vals) Vals = DataTables("int_LCL").GetValues("FOB_1_Currency|CIF_1_Currency|DDU_1_Currency", "[Origin_Country] is not null") val.AddRange(vals) Vals = DataTables("international_FCL").GetValues("FOB_1_Currency|CIF_1_Currency|DDU_1_Currency", "[Origin_Country] is not null") val.AddRange(vals)
以上为从各个表里面的数个列抓取不同的货币。 Dim Vals2 As new List(of String) For i As Integer = 0 To Vals.Count - 1 For u As Integer =0 To 2 vals2.add(val(i)(u)) Next Next
以上为将字符数组的合并到一个集合里面,变成1维。
问题:如何排除掉vals2这个1维集合里面的重复的值?
|