Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
how to reverse string without using predefined function
Ravi Yadav
Aug 26 2016 6:04 AM
392
Reply
using
System;
namespace
ConsoleCRM
{
class
Ravishanakr
{
static
void Main(
string
[] args)
{
Console
.WriteLine("
Enter string by keyboard
");
string
_OldString =
Console
.ReadLine();
string
_NewString =
string
.Empty;
int
_Length = 0;
foreach
(
char
_Char
in
_OldString)
_Length++;
for
(
int
I = _Length - 1; I >= 0; I--)
{
_NewString = _NewString + _OldString[I];
}
Console
.WriteLine(_NewString);
Console
.ReadLine();
}
}
}
Output
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
JSON with C#.Net
Passing the Cityid using for each loop but only last city id