我想搜索一個具有四列的現有ListView並在全新的ListView中輸出搜索結果。以下是我迄今:搜索/查詢ListView並將結果打印到新的ListView中
private void qryBtn_Click(object sender, EventArgs e)
{
var results = listResx.Items.Cast<ListViewItem>()
.Where(x => x.Text.Contains(textQuery.Text));
foreach (var d in results)
{
listQuery.Items.Add(d.ToString());
}
}
現有解決方案的問題是什麼? – 2013-03-15 15:12:19