src/Shared/EntityFramework/Core/Metadata/Edm/MemberCollection.cs
// <summary>
// Gets the index relative to this collection for the given index.  For an index to really refers to something in
// the base type, the return value is negative relative to this collection.  For an index refers to something in this
// collection, the return value is positive.  In both cases, it's simply (index) - (base type member count)
// </summary>
// <returns> The relative index </returns>
Gets the index relative to this collection for the given index.  For an index to really refers to something in
the base type, the return value is negative relative to this collection.  For an index refers to something in this
collection, the return value is positive.  In both cases, it's simply (index) - (base type member count)
Gets the index relative to this collection for the given index . For an index to really refers to something in the base type the return value is negative relative to this collection . For an index refers to something in this collection the return value is positive . In both cases it ' s simply ( index ) - ( base type member count )
private int GetRelativeIndex(int index)
        {
            var baseTypeMemberCount = GetBaseTypeMemberCount();
            var thisTypeMemberCount = base.Count;
            if (index < 0
                || index >= baseTypeMemberCount + thisTypeMemberCount)
            {
                throw new ArgumentOutOfRangeException("index");
            }
            return index - baseTypeMemberCount;
        }
private int GetRelativeIndex ( int index ) { var baseTypeMemberCount = GetBaseTypeMemberCount ( ) ; var thisTypeMemberCount = base . Count ; if ( index < 0 || index >= baseTypeMemberCount + thisTypeMemberCount ) { throw new ArgumentOutOfRangeException ( " " ) ; } return index - baseTypeMemberCount ; }
Gets the index relative to this collection for the given index.
Gets the index relative to this collection for the given index .
// Check if the index is in range
The relative index
The relative index
index
int