if(NumericUpDown1.Text == "") { // If the value in the numeric updown is an empty string,replace with 0. NumericUpDown1.Text = "0"; }