private void button1_Click(object sender, EventArgs e) { char[] p_chr = text_input.Text.ToCharArray(); Array.Reverse(p_chr, 0, text_input.Text.Length); text_output.Text = new StringBuilder().Append(p_chr).ToString(); }
主要用到reverse。
2021-12-09 09:16:12
private void button1_Click(object sender, EventArgs e) { char[] p_chr = text_input.Text.ToCharArray(); Array.Reverse(p_chr, 0, text_input.Text.Length); text_output.Text = new StringBuilder().Append(p_chr).ToString(); }
主要用到reverse。