Hi, is it ok to use an if condition as a presence check, this is my code -
if (textBox1 != null)
{
MessageBox.Show("Dont Leave Blank");
}
else
MessageBox.Show("Successfully added");
my code runs however no matter if there is text in textbox1 or if its left empty it shows "Dont Leave Blank" any suggestions?
thanks