2
我們如何變換字符串列表或一行使用LINQ,其中對象是例如對象的ListViewItemCollection列表具有名稱屬性的人將顯示給ListViewItem。如何在一行列表<string>或列表<object>轉換爲ListView.ListViewItemCollection
這裏是我當前的代碼:
foreach (string word in sf.lstWords)
{
lvWords.Items.Add(new ListViewItem(word));
}