public new void Insert(int index, T item) { OnInsertBefore?.Invoke(this, new NListEventArgs <T>(item, -1)); if (_stopcapacity > 0 && Count >= _stopcapacity) { Clear(); } base.Insert(index, item); OnInsertAfter?.Invoke(this, new NListEventArgs <T>(item, index)); }
public new void Add(T item) { OnInsertBefore?.Invoke(this, new NListEventArgs <T>(item, Count)); if (_stopcapacity > 0 && Count >= _stopcapacity) { Clear(); } base.Add(item); OnInsertAfter?.Invoke(this, new NListEventArgs <T>(item, Count)); }