Why do I sometimes get duplicates within my lists?

It's possible that an Add operation is being triggered twice. Modify your AddItem event handler to check the existence of an item before adding it.

Instead of:

  void AddItem(IEntity item, OperationEventArgs e)
  {
    _myList.Add(item, e);
  }

use:

  void AddItem(IEntity item, OperationEventArgs e)
  {
    if (!_myList.Contains(item))
    {
      _myList.Add(item, e);
    }
  }

Search Knowledge Base

Have a question? Ask here.

Your name * Your email address * Your question/comment*