我在用C#的winform做一个登陆邮箱,窗口From1中放置邮箱和密码,怎么把From1中的邮箱和密码传到From2中
展开全部
//Form1:
private string username;
private string password;
public string UserName
{
get{ return this.username; }
}
public string Password
{
get{ return this.password; }
}
//Form2:
Form1 f = new Form1();
f.ShowDialog();
string name = f.UserName;
string pswd = f.Password;
private string username;
private string password;
public string UserName
{
get{ return this.username; }
}
public string Password
{
get{ return this.password; }
}
//Form2:
Form1 f = new Form1();
f.ShowDialog();
string name = f.UserName;
string pswd = f.Password;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询