Difference between ienumerable and list in c#?
Ask by Hemant Patel
Updated 24 Sep 2020
The difference is that IEnumerable<string> is merely a sequence of string but a List<string> is indexable by an int index, can be added to and removed from and have items inserted at a particular index.
A List<string> is a specific random-access variable-size collection.
A List<string> is a concrete implementation of IEnumerable<string>.
An IEnumerable<string> is general sequence of string that can be iterated but doesn't allow random access.