我如何使用LINQ或Casting方法将一个字符串数组一步添加到Listview中?
这是我尝试但不起作用的:
ListView1.Items.AddRange("a b c d e f".Split(" ").ToArray _ .Select(Function(x) New ListViewItem(x)))
更新:
另一种尝试,不起作用:
ListView1.Items.AddRange( _ New ListView.ListViewItemCollection( _ {"Value 1","Value 2","Value 3"} _ .Select(Function(x) New ListViewItem(x))))