コード例 #1
0
        private void btnAddECs_Click(object sender, EventArgs e)
        {
            Person foundPerson = school.GetPerson(Convert.ToInt32(tbxActionsPCN.Text));

            if (foundPerson is Student)
            {
                ((Student)foundPerson).AddECs(3);
                ShowInfoPerson(foundPerson);
            }
            else
            {
                MessageBox.Show("Person is not a student!");
            }
        }