Sunday, September 4, 2011

Reverse of a string by words C# example


Reverse of a string in C#, VB .Net, or C++ is pretty easy. Please not that we are talking about a word by word string reversal, for example

Hello How Are You
You Are How Hello

Reversing characters inside a word is a different story, not covered here.
Some people find word order reversal difficult, so I'm putting the C# example code here.