Hi!
I need to have a message saying that the stock is minimum. How can I say if the number is egal or minus to 5 into my textbox1 say Stock is minimum.
private void button1_Click(object sender, EventArgs e)
{
if (textbox1 >= 5)
MessageBox.Show('Stock is minimum');
}

Nitin SontakkeRank #264 · 9.6K reputationPosted Mar 16, 2018, 7:44 PM EDT
Sagar Pandurang KapRank #606 · 4K reputationPosted Feb 23, 2018, 8:16 PM EST
IsraelRank #1,223 · 1.5K reputationPosted Mar 3, 2018, 3:00 AM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Mar 3, 2018, 7:36 PM EST
IsraelRank #1,223 · 1.5K reputationPosted Mar 16, 2018, 10:35 AM EDT
{
Int32 number = 0; Boolean success = false;
success = Int32.TryParse(textBox1.Text, number);
if (!success)
MessageBox.Show("Please enter a valid integer value!");
else
if (number >= 5)
MessageBox.Show("Stock is minimum");
}
IsraelRank #1,223 · 1.5K reputationPosted Mar 16, 2018, 10:02 PM EDT