I am using FxCop for my WPF MVVM assembly and it gives me the error
Collection properties should be read only
But in my propert
You should rarely need to raise a PropertyChanged event on a collection. Make the collection observable so that it notifies any bindings whenever items are added or removed:
public IList<Employee> Employees
{
get;
private set;
}
// in your constructor:
this.Employees = new ObservableCollection<Employee>();
If you make your collection an ObservableCollection then the "important" events will be when items are added and removed from the collection, not when the collection is instatiated. I agree, with FxCop. Make the collection readonly, but make it an ObservableCollection