16,554
社区成员
发帖
与我相关
我的任务
分享
Dim a() As String = {"151", "152", "153", "154"}
Dim b() As String = {"151", "152", "153", "154"}
Dim Result1 = a.Except(b) '数组a中的差集
Dim Result2 = b.Except(a) ' 数组b中的差集
For Each s In Result1
MsgBox(s)
Next
For Each s In Result2
MsgBox(s)
Next
Dim a() As String = {"151", "152", "153", "154"}
Dim b() As String = {"151", "152", "153", "155"}
Dim c As IEnumerable(Of String) = a.Except(b)
For Each i As String In c
Debug.Print(i)
Next