May 2010
Intermediate to advanced
1272 pages
61h 18m
English
You might want to compare two sequences to check if they are perfectly equal. The SequenceEqual extension method allows performing this kind of comparison. It compares if a sequence is equal considering both items and the items order within a sequence, returning a Boolean value. The following code returns True because both sequences contains the same items in the same order:

The following code returns instead False, because although both sequences contain the same items, they are ordered differently:

Read now
Unlock full access