if (T1.Text = "admin" && T2.Text = "admin")
-
if (T1.Text = "admin" && T2.Text = "admin") { Console.WriteLine("Login success"); } wasts wrong in this code.. am getting error
self confidence+hard work=SUCCESS
-
if (T1.Text = "admin" && T2.Text = "admin") { Console.WriteLine("Login success"); } wasts wrong in this code.. am getting error
self confidence+hard work=SUCCESS
This is the most frequent programming error of all times: You used the assignment operator (
=
) instead of the comparison operator (==
) in yourif
statement. Useif (T1.Text == "admin" && T2.Text == "admin")
instead, and everything is fine... :) Regards Thomaswww.thomas-weller.de Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Programmer - an organism that turns coffee into software. -
if (T1.Text = "admin" && T2.Text = "admin") { Console.WriteLine("Login success"); } wasts wrong in this code.. am getting error
self confidence+hard work=SUCCESS
-
if (T1.Text = "admin" && T2.Text = "admin") { Console.WriteLine("Login success"); } wasts wrong in this code.. am getting error
self confidence+hard work=SUCCESS
Your controls are poorly named, your username and password are hard coded and are the same ? Oh, and you used = instead of ==.
Christian Graus Driven to the arms of OSX by Vista.