我想搜索具有四列的现有 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());
}
}