Ok, so I'm trying to compare two numeric updown's values and if they're 0, I want a message to show. However, I want individual messages to show if either of the two numeric are 0 instead of one as well. The message boxes don't show when I press the button it's assigned under. My code so far looks as so;
if (nudInterest.Value ==0 && nudTerm.Value ==0)
{
MessageBox.Show("Please enter a valid number for your Interest and Amortization.");
}
else if (nudInterest.Value ==0)
{
MessageBox.Show("Please enter a valid number for your Interest.");
}
else if (nudTerm.Value ==0)
{
MessageBox.Show("Please enter a valid number for your Amortization.");
}
Aucun commentaire:
Enregistrer un commentaire