BExIS.Ddm.Model.SearchResult.GetIndexOfRowByID C# (CSharp) Method

GetIndexOfRowByID() public method

public GetIndexOfRowByID ( int id ) : int
id int
return int
        public int GetIndexOfRowByID(int id)
        {
            int headerId = GetIndexOfID();
            int index = 0;

            foreach (Row r in Rows)
            {
                if (r.Values.ToList().ElementAt(headerId).Equals(id)) return index;
                else index++;
            }

            return index;
        }