private void toolDigData_Click(object sender, EventArgs e) { ListView[] lvs = new ListView[] { lvMetaTable, lvTableData, lvProps }; DigData(lvs.FirstOrDefault(lv => lv.SelectedItems.Count > 0)); }