将im a student 转换为student a im输出
private void button1_Click(object sender, EventArgs e) { this.textBox2.Text=ReverseString(this.textBox1.Text.Trim()); } public string ReverseString(string s) { char[] chars = s.ToCharArray(); Array.Reverse(chars); return new string(chars); }