All you guys have shown code that totally reverses the string, and that's not what the OP wanted.

"My Name is Bonnie" should end up being "Bonnie is Name My". With the code that's been shown thusfar (except for the OP's code with the use of the .Split() method), the result would be "einnoB si emaN yM". That's not what he wanted.

@nitinsharma1983 -- what the heck is wrong with using .Split() and why the heck would you not want to take advantage of the capabilities of the language?~~Bonnie Berent [C# MVP]

I think this may be more of what you are looking for. Basically its a simple C++ programming interview question. Replace a string in place. For C# I believe you have to use StringBuilder instead of string since strings are immutable and
don't like to be changed like that.