Collection properties should be read only

前端 未结 2 1037
陌清茗
陌清茗 2021-01-14 08:10

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

2条回答
  •  -上瘾入骨i
    2021-01-14 09:09

    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

提交回复
热议问题