Reverse a string in c#

Satyapriyanayak
Posted by Satyapriyanayak under C# category on | Points: 40 | Views : 918
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Reverse_string
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
string s1 = "dot net funda";
string[] s2 = s1.Split(' ');
Array.Reverse(s2);
string s3 = String.Join(" ", s2);
MessageBox.Show(s3);

}
}
}

Comments or Responses

Login to post response