Mid Collections

How do you iterate through a SortedSet<T>?

Use a foreach loop which iterates over the elements in sorted ascending order:

foreach (var item in sortedSet)

Console.WriteLine(item);

Follow:

More from C# Programming Tutorial

All questions for this course