A program that will ask the user to give a string and then the program will display the original string and reverse string output using C# programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Program Listing

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Reverse_String
{

    
static class StringHelper
{
public static string ReverseString(string str)
{
char[] array = str.ToCharArray() ;
Array.Reverse(array) ;
return new string(array) ;
}
}


    class Program
    {

        
        static void Main(string[] args)
        {


            Console.Write("\n\n");
            Console.Write("Reverse a String in C#");
            Console.Write("\n\n");
            Console.Write("Give a String : ");
            string originalString = Console.ReadLine();

            Console.Write("\n\n");
            Console.Write("Original String     :  " + originalString);
            Console.Write("\n\n");
            Console.WriteLine("Reverse String  : " + StringHelper.ReverseString(originalString));
            Console.ReadLine();
        }
    }
}

Leave a Reply

Your email address will not be published.