Using a constructor is strange to you? :<
//OptimumMain om = new OptimumMain();
string username = OptimumMain.txtWebUser.Text;
string password = OptimumMain.txtWebPass.Text;
public static username; public static password;
Public string username; Public string password;
iWebWrap ir = new iWebWrap();//iWebWrap is the login class
ir.username = txtWebUser.Text;
ir.password = txtWebPass.Text;
iWebWrap ir = new iWebWrap(txtWebUser.Text, txtWebPass.Text);
public string username;
public string password;
public void login()
{
if (username == "admin" && password == "admin")
{
MessageBox.Show("Worked !");
}
else
{
MessageBox.Show("Wrong ID or PW");
}
}
iWebWrap ir = new iWebWrap();
ir.username = txtWebUser.Text;
ir.password = txtWebPass.Text;
ir.login();