private void btnShowResult_Click(object sender, EventArgs e) { AccessSpecifier compute = new AccessSpecifier(); if (txtFirstNumber.Text == String.Empty) { MessageBox.Show("First Number cannot be empty"); txtSecondNumber.Focus(); return; } compute.FirstNumber = Convert.ToDouble(txtFirstNumber.Text); compute.SecondNumber = Convert.ToDouble(txtSecondNumber.Text); MessageBox.Show("The public result is: " + Convert.ToString(compute.ShowResult())); txtFirstNumber.Text = string.Empty; txtSecondNumber.Text = string.Empty; }
private void btnShowMessage_Click(object sender, EventArgs e) { AccessSpecifier ResultMessage = new AccessSpecifier(); MessageBox.Show(ResultMessage.ShowMessage()); }