http://www.centrifugalbumblepuppy.com/posts/asp-net-collections-interfaces.aspx
For all public properties and method parameters, accept the least restrictive interface.
For all custom collections, implement the most restrictive interface possible.
This means that if a custom collection is in the slightest bit list-like, it should implement IList whenever possible. Conversely, all your methods should accept ICollections, even if this means re-implementing some functionality through static extension classes or decorators.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment