错误1 运算符“*”无法应用于“int”和“方法组”类型的操作数
protected void Page_Load(object sender, EventArgs e)
{
ArrayList shopCartList = (ArrayList)Session["shopList"];
GridView1.DataSource = shopCartList;
GridView1.DataBind();
// GridView1.DataKeyNames = new String[] { "isbn" };
//计算购物车物品总价格
int sumPrice = 0;
for (int i = 0; i < shopCartList.Count; i++)
sumPrice += (((shopObject)shopCartList[i]).Cpdj * ((shopObject)shopCartList[i]).Count);
labSumPrice.Text = "购物车总价格为:" + sumPrice + "元";
}
出错在这一行
sumPrice += (((shopObject)shopCartList[i]).Cpdj * ((shopObject)shopCartList[i]).Count);