private void ValidateIndex( int i, bool allowEqualEnd )
{
int max = ( allowEqualEnd ) ? ( m_count ) : ( m_count - 1 );
if ( i < 0 || i > max )
#if !(XBOX || XBOX360 || SILVERLIGHT )
throw new System.ArgumentOutOfRangeException( "Index was out of range. Must be non-negative and less than the size of the collection.", (object)i, "Specified argument was out of the range of valid values." );
#else
throw new System.ArgumentOutOfRangeException("Index was out of range. Must be non-negative and less than the size of the collection.", "Specified argument was out of the range of valid values.");
#endif
}