1
Vote

Error when filtering a sorted obs collection

description

Create an observable collection which sorts then filters some underlying observable collection. e.g.
underlyingCollection
.OrderBy(product => product.Name)
.Where(product => produce.Name == "SomeProduct")
Assign to a property of an element of the underlying collection such that
  1. the element's order in the sorting changes and simultaneously
  2. the element now passes the filter (and did not before the assignment)
underlyingCollection[3].Name = "SomeProduct"
Observe: an array index out of bounds exception is thrown.

Sorry this isn't very detailed, if you're interested in looking at this I'll write up some proper code demonstrating the problem

comments