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 GunDong
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string str = textBox1.Text;
char first = str[0];
string remain = str.Substring(1);
textBox1.Text = remain + first;
}
private void button2_Click(object sender, EventArgs e)
{
string str = textBox1.Text;
int i = str.Length;
char end = str[i-1];
string remain = str.Substring(0,i-1);
textBox1.Text = end+remain;
}
}
}
![](https://img-my.csdn.net/uploads/201301/09/1357715681_9894.jpg)