I am wondering why I have this problem with my list.
I am trying to retrieve the object for the previous index, so -1;
Is that the good way to do ?
thePreviousList.Find(previousItem => previousItem.Id - 1);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, the best way is to use the index:
But probably i’ve misunderstood your requirement.
If you want to find an item by it’s ID(assuming that it has this property):