public T this[int i] { get { return(list[i].Value); } set { if (list[i] != null) { list[i].Value = value; } else { list[i] = new PropertyListItem <T>(value); BroadcastChange(); } } }
public void Add(T item) { PropertyListItem <T> listItem; if (pool.Count > 0) { listItem = pool.Dequeue(); listItem.Value = item; } else { listItem = new PropertyListItem <T>(item); } listItem.Changed += OnItemChanged; list.Add(listItem); BroadcastChange(); }