杨老师的winfrom基础练习中有个程序让下面自己编去~我写了一个大家看看有啥问题不
给点意见哦~~
private void button1_Click(object sender, EventArgs e)
{
string str = textBox1.Text;
char first = str[0];
string lost = str.Substring(1);
textBox1.Text = lost + first;
}
private void button2_Click(object sender, EventArgs e)
{
string str2 = textBox1.Text;
char last = str2[str2.Length-1];
string lons = str2.Substring(0,str2.Length-1);
textBox1.Text = last+lons;
|
|