新手:: 无法将类型“int”隐式转换为“string”
源码publicpartialclass_Default:System.Web.UI.Page{protectedvoidPage_Load(objectsender,E...
源码
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public void jiafa()
{
int x = 1;
int y = 2;
int qqq;
qqq = x + y;
leabletxt.Text = qqq;
}
}
编译器错误消息: CS0029: 无法将类型“int”隐式转换为“string”
源错误:
行 22: int qqq;
行 23: qqq = x + y;
行 24: leabletxt.Text = qqq;
行 25: }
行 26: } 展开
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public void jiafa()
{
int x = 1;
int y = 2;
int qqq;
qqq = x + y;
leabletxt.Text = qqq;
}
}
编译器错误消息: CS0029: 无法将类型“int”隐式转换为“string”
源错误:
行 22: int qqq;
行 23: qqq = x + y;
行 24: leabletxt.Text = qqq;
行 25: }
行 26: } 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询