Example #1
0
        private void BtRemoveLast_Click(object sender, EventArgs e)
        {
            list.RemoveLast();
            RichTxtBxName.Clear();
            RichTxtBxName.AppendText("LISTA: \n");
            Node timer = list.Begin;

            while (timer != null)
            {
                RichTxtBxName.AppendText(timer.Name.ToString() + " --------- " + timer.Age.ToString() + " \n");
                timer = timer.Next;
            }
        }
Example #2
0
        private void BtAddFirst_Click(object sender, EventArgs e)
        {
            string Name = TxtBxName.Text;
            int    Age  = (int)NumericUpDownIdade.Value;

            list.InsertFirst(Name, Age);
            RichTxtBxName.Clear();
            RichTxtBxName.AppendText("LISTA: \n");
            Node timer = list.Begin;

            while (timer != null)
            {
                RichTxtBxName.AppendText(timer.Name.ToString() + " ---------- " + timer.Age.ToString() + " \n");
                timer = timer.Next;
            }
        }