SyntaxFix
Write A Post
Hire A Developer
Questions
If you don't want to use LINQ, then:
int index; for (int i = 0; i < myList.Count; i++) { if (myList[i].Prop == oProp) { index = i; break; } }
this way you are iterating list only once.