Generic.List vs ObjectModel.Collection

  • Thread starter Thread starter schneider
  • Start date Start date
S

schneider

Fx Cop says to use Collection instead of List when exposed in a API, but
always have the pains due to lack of features in Collection.

No Sort.
No Copy To.
No Add Range.
No Predicts.

What is everyone else doing?

Thanks,

Schneider
 
Internally you can work with a list and export to a collection externally.
Externally, once you receive a collection, you can populate a list.
 
Hello,

I generally use List<T> internally and expose it via IList<T>.

Best regards,
Henning Krause
 
Back
Top