Private void butten1.click(object sender,eventArgs e) { if(textBox1.Text="admin") { if(textbox2.text="password"){ form2 f2=new form(); form2.show();} else{ messagebox.show("incorrect password");} while i am run this code i get the error like cannot implicitly convert type string into bool.