// if user input is negative
if (h < 0)
{
// assign absolute version of user input
number = Math.Abs(n);
pictureBox14.Visible = true;
}
else
{
// else assign user input
number = n;
number = 0; // if user input is not an int then set number to 0
pictureBox6.Visible = true;
}
What is the correct code for validating to int ONLY? That integer is the only one I want to input in the textbox then the picturebox will appear.