1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
Imports System.Text Dim lb1 As List(Of String) = ListBox1.Items.Cast(Of Object)().Select(Function(s) s.ToString()).ToList() Dim lb2 As List(Of String) = ListBox2.Items.Cast(Of Object)().Select(Function(s) s.ToString()).ToList() Dim lbDiff As List(Of String) = lb1.Except(lb2).ToList() Dim stringDiff As New StringBuilder() lbDiff.ForEach(Function(s) stringDiff.Append(s & vbCrLf)) MessageBox.Show(stringDiff.ToString())