generics - What advantage do you get with a collection over List(Of T) in .NET 2.0+ -


I was asked another developer why I use the list at all places ... and I Thought for a minute .. And did not come with a definite answer.

If you get the collection from the base class instead of using the collection (ST) - then what benefit do you get? Or - What did you not get along with the list?

Normal list promotes performance.

View this question:

Excerpt from:

To use type-specific implementation It's for your benefit, instead of using the Arrayist class or writing a strongly written cover, instead of the list & lt; (OF & LT; (T>)>) The reason for this is that your implementation should already be done by you for the NAT Framework, and the common language runtime can share Microsoft Intermediate language code and metadata, which is your implementation can not do.


Comments