直接上控制台代码:
Module Module1Sub Main()Console.WriteLine("请输入数据,以"",""相隔:")Dim str As String = Console.ReadLineDim result = From x In str.Split(",")Group By x Into CountWhere Count > 1Select xConsole.WriteLine("重复数据为:" & Join(result.ToArray, ","))Console.ReadKey()End Sub
End Module
演示效果: