When using the .ToList()
extension method on a Stack<T>
, is the result the same as popping each element and adding to a new list (reverse of what was pushed)?
If so, is this because it really is iterating over each element, or does it store the elements in reverse internally and slip the array into a new List<T>
?