Resharper says I shouldn't use List

I have a method:

static void FileChangesDetected(List<ChangedFiles> files)

I used Visual Studio 2010 and Resharper. Resharper always recommends that I change the List to IEnumerable, and I'm wondering why this is.

In the method, I simply do this:

 foreach (var file in files)
 { ... }

Is there a benefit of using IEnumerable rather than List?

26
задан thirtydot 28 May 2011 в 22:32
поделиться