TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Reverse Letter on all Words in a Sentence in C#
Selva Ganapathy
May 21
2015
Code
1.4
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
StringReverse.zip
namespace
StringReverse
{
class
Program
{
static
void
Main(
string
[] args)
{
Console.WriteLine(
"Enter the string to reverse the word"
);
var value = Console.ReadLine();
Console.WriteLine(
"Reverse words is : "
);
if
(value !=
null
)
{
string
[] strings = value.Split(
' '
);
foreach
(var item
in
strings)
{
string
reverseString =
string
.Empty;
for
(
int
i = item.Count() - 1; i >= 0; i--)
{
reverseString += item[i];
}
Console.Write(reverseString +
' '
);
}
Console.ReadLine();
}
}
}
}
reverse string
string manipulation