I have created a list "internalList" for internal data storing. I'm trying to implement the Add method but it doesn't show up when i try to instantiate a new ObservableList<T> list. Can somebody exmplain how I should implement this add method?
public class ObservableList<T> : IEnumerable<T>, IObservableList<T>
{
// private variabel to work as
// the internal data storage for the list
private List<T> internalList;
public ObservableList()
{
internalList = new List<T>();
}
public IEnumerator<T> GetEnumerator()
{
return internalList.GetEnumerator();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return ((System.Collections.IEnumerable)internalList).GetEnumerator();
}
public void Add(T item)
{
internalList.Add(item);
}
public event EventHandler<RejectableEventArgs<T>> BeforeChange;
public event EventHandler<RejectableEventArgs<T>> Changed;
public bool Contains(T item)
{
throw new NotImplementedException();
}
public void Remove(T item)
{
internalList.Remove(item);
}
public bool TryAdd(T item)
{
throw new NotImplementedException();
}
public bool TryRemove(T item)
{
throw new NotImplementedException();
}
}
}

New Topic/Question
Reply



MultiQuote





|