BrightIdeasSoftware.ObjectListView.IndexOf C# (CSharp) Method

IndexOf() public method

Find the given model object within the listview and return its index
public IndexOf ( Object modelObject ) : int
modelObject Object The model object to be found
return int
        public virtual int IndexOf(Object modelObject)
        {
            for (int i = 0; i < this.GetItemCount(); i++) {
                if (this.GetModelObject(i).Equals(modelObject))
                    return i;
            }
            return -1;
        }
ObjectListView