字符串反转(面试)

将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);
        }
原文地址:https://www.cnblogs.com/shanoon/p/5467837.html