using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.textusername.Text = "";
this.textuserpwd.Text = "";
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
}
protected void TextBox2_TextChanged(object sender, EventArgs e)
{
}
protected void btnLogin_Click(object sender, EventArgs e)
{
if (this.textusername.Text = "a" && this.textuserpwd.Text = "a"[color=00FF00]//就是这行 {
this.lbMessage.Text = "登入成功";
}
else
{
this.lbMessage.Text = "登入失败";
}
}
}[/color]
为什么&&在c# 2005编译器里被看做是是运算符?而在c#2003编译器里就不会报错?我想要达到"和"的效果应该用什么关键字?