SyntaxFix
Write A Post
Hire A Developer
Questions
Just use break, like that:
int cont = 0; foreach (ListViewItem lvi in listView.Items) { if(cont==50) { //if listViewItem reach 50 break out. break; } cont++; //increment cont. }