i have following class:
public class FirstClass
{
public FirstClass()
{
list = new List<SomeType>();
}
public List<SomeType> list;
}
Is this possible to do some actions like fire different method after someone will put element into that list?
You should use a
ObservableCollection<SomeType>for this instead.ObservableCollection<T>provides theCollectionChangedevent which you can subscribe to – theCollectionChangedevent fires when an item is added, removed, changed, moved, or the entire list is refreshed.