What is the difference between HashSet<T> and List<T>?

Viewed 92474

Can you explain what is the difference between HashSet<T> and List<T> in .NET?

Maybe you can explain with an example in what cases HashSet<T> should be preferred against List<T> ?

8 Answers
Related