How do you find the index of an object in a binding list? Below is my code:
public class Object
{
public string Name { get; set; }
public int id { get; set; }
}
BindingList<Object> objectList = new BindingList<Object>();
I want to do something like var int = objectList.FindIndex(a => a.Name == "Text");
I've seen the use of SingleOrDefault
from LINQ to find the object itself, but how can I find the index?