资 源 简 介
C# 简单模拟递增运算、递减运算:
private void repeatButton1_Click(object sender, RoutedEventArgs e)
{//递增运算
Int32 MyNum = Convert.ToInt32(this.textBox1.Text);
this.label1.Content = "正在进行递增运算:";
this.textBox1.Text = ((MyNum + 1).ToString());
}
private void repeatButton2_Click(object sender, RoutedEventArgs e)
{//递减运算
Int32 MyNum = Convert.ToInt32(this.textBox1.Text);
this.label1.Content = "正在进行递减运算:";
this.textBox1.Text = ((MyNum - 1).ToString());
}