本文整理匯總了VB.NET中System.Linq.Queryable.Intersect方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET Queryable.Intersect方法的具體用法?VB.NET Queryable.Intersect怎麽用?VB.NET Queryable.Intersect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。
在下文中一共展示了Queryable.Intersect方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: id1
Dim id1() As Integer = {44, 26, 92, 30, 71, 38}
Dim id2() As Integer = {39, 59, 83, 47, 26, 4, 30}
' Get the numbers that occur in both arrays (id1 and id2).
Dim both As IEnumerable(Of Integer) = id1.AsQueryable().Intersect(id2)
Dim output As New System.Text.StringBuilder
For Each id As Integer In both
output.AppendLine(id)
Next
' Display the output.
MsgBox(output.ToString())
輸出:
26 30