I want to print string in reverse format:
Input: My name is Archit Patel
My name is Archit Patel
Output: Patel Archit is name My.
Patel Archit is name My
I\'ve tied the
You could try:
string[] words = "My name is Archit Patel".Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); IEnumerable reverseWords = words.Reverse(); string reverseSentence = String.Join(" ", reverseWords);