>>>>Worked for me:
Stack<string> s = new Stack<string>();
>>>> s.Push("A");
>>>> s.Push("B");
>>>> s.Push("C"); // C,B,A
>>>> s.Reverse(); // A,B,C
>>>>
>>>
>>>Hi Viv,
>>>
>>>Without the extension method - it won't work
>>>
>>> Stack<string> s = new Stack<string>();
>>> s.Push("A");
>>> s.Push("B");
>>> s.Push("C"); // C,B,A
>>> s.Reverse(); // A,B,C
>>>
>>> while (s.Count != 0)
>>> {
>>> Console.WriteLine(s.Pop());
>>> }
>>> Console.ReadLine(); // C, B, A
>>>
>>Huh? My output was A B C.......
>
>Then you must have tested it with my extension method ...
>
>There is also an Extension method on IEnumerable(T) that is called Reverse()
>
>s.Reverse() returns an Enumerator in reverse order - ie does not touch the stack - see
http://msdn.microsoft.com/en-us/library/bb358497.aspx>
>
>Stack and Queue do not implement a Reverse() whereas List(T) has both a 'natural' Reverse() method and an extension method Reverse()
>
>
>Fun !
doh! I thought you meant that your extension method wasn't working. I see what you mean about the inbuilt one.
var c = s.Reverse() (on the native em) shows that the return type is
!