I would tend towards using the IList
interface parameter over the concrete implementation, unless there was some reason you absolutely HAD to have the concrete List
parameter.
By using IList
instead of List
, your method can now accept all collection types that implement IList
, which may or may not be a collection that directly inherits from List
. List
and any of its subclasses implement IList
as well, so they would also be included in the set of available types your method could use. Using IList
in this case allows you to be more flexible.
Also, in unit testing scenarios, IList
may be easier to mock out, depending on what exactly you're trying to test and what your features your mocking framework has.