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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top