I want to perform a username and password check before allowing access to Form2. Form2 should only load if the name
and password
match. However, my code doesn't work and Form2 always loads. And also How can i close the first form when the second opens
private void BtnLogin_Click(object sender, EventArgs e)
{
var newForm = new Form2();
if (txtbName.Text = "Georgi"&& txtbPassword.Text = "123" )
{
newForm.Show();
}
}