ROSTAM2
جمعه 15 مهر 1401, 14:47 عصر
ایجاد یک لیست از آیتم های مشترک بین دو لیست (رشته ای) توسط LINQ
Dim List1, List2 As New List(Of String)
List1.Add("A")
List1.Add("B")
List1.Add("C")
List1.Add("D")
List1.Add("E")
List1.Add("F")
List2.Add("a")
List2.Add("b")
List2.Add("c")
Dim MergeList = From ItemA As String In List1 From ItemB As String In List2 Where ItemA.ToLower = ItemB.ToLower
Select ItemA
For Each Item As String In MergeList
MsgBox(Item)
Next
Dim List1, List2 As New List(Of String)
List1.Add("A")
List1.Add("B")
List1.Add("C")
List1.Add("D")
List1.Add("E")
List1.Add("F")
List2.Add("a")
List2.Add("b")
List2.Add("c")
Dim MergeList = From ItemA As String In List1 From ItemB As String In List2 Where ItemA.ToLower = ItemB.ToLower
Select ItemA
For Each Item As String In MergeList
MsgBox(Item)
Next