Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 99 characters in body
Source Link
Sweeper
  • 291.9k
  • 23
  • 260
  • 438

You can Skip, Take, and SequenceEqual:

return left.Skip(lIndex).Take(num).SequenceEqual( right.Skip(rIndex).Take(num)) 

Note that you should make your Compare method generic and use the generic IList<T> instead.

You can Skip, Take, and SequenceEqual:

return left.Skip(lIndex).Take(num).SequenceEqual( right.Skip(rIndex).Take(num)) 

You can Skip, Take, and SequenceEqual:

return left.Skip(lIndex).Take(num).SequenceEqual( right.Skip(rIndex).Take(num)) 

Note that you should make your Compare method generic and use the generic IList<T> instead.

Source Link
Sweeper
  • 291.9k
  • 23
  • 260
  • 438

You can Skip, Take, and SequenceEqual:

return left.Skip(lIndex).Take(num).SequenceEqual( right.Skip(rIndex).Take(num))