示例#1
0
 public void Clear()
 {
     IgnoreNextCollectionChangedEvent = true;
     T[] oldItems = List.ToArray();
     List.Clear();
     foreach (T oldItem in oldItems)
     {
         FireRemove(oldItem);
     }
     NotifyCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
 }