private void ButtonBack_Click(object sender, EventArgs e) { if (TextStkNew.Count != 0) { textBoxNew.Text = (string)TextStkNew.Peek(); textBoxOld.Text = (string)TextStkOld.Peek(); TextStkNew.Pop(); TextStkOld.Pop(); } else { textBoxNew.Text = ""; textBoxOld.Text = ""; } }
new private void TextChanged() { TextStkNew.Push(textBoxNew.Text); TextStkOld.Push(textBoxOld.Text); }