Bloom.Book.Page.GetIndex C# (CSharp) Method

GetIndex() public method

Return the index of this page in the IEnumerable of pages
public GetIndex ( ) : int
return int
        public int GetIndex()
        {
            var i = 0;
            foreach (var page in Book.GetPages())
            {
                if (page == this) return i;
                i++;
            }

            return -1;
        }