By reading similar posts I've learned that a List is a type of IEnumerable. But I'm really wondering what the practical difference between those two actually is.
To someone who always have used a List and never used IEnumerable:
- What is the practical difference between the two?
- In what scenarios is one of them better than the other?
Here is a practical example: We want to store four strings, order them alphabetically, pass them to another function and then show the user the result. What would we use and why?
Hopefully someone can sort this out for me or point me in the right direction. Thanks in advance!