For Empty textbox validation we need to follow the below code:
if (textBox1.Text == "")
{
string myStringVariable1 = string.Empty;
MessageBox.Show("User Name is requierd");
}
else if (textBox2.Text == "")
{
string myStringVariable2 = string.Empty;
MessageBox.Show("Password is requierd");
}
else if (comboBox1.Text == "--Choose--")
{
string myStringVariable3 = string.Empty;
MessageBox.Show("Select User Type");
}