I have an array list that I would like to get the sum of all the elements, right now the code that I have writes elements on the screen, how I can get the sum of that elements?
for (int i = 0; i < list.Count; i++)
{
if (((LineItemInfo)list[i]).QuantityBackordered > 0)
decimal MerchandiseCharge = (decimal)(Session["MerchandiseCharge"]);
Response.Write("<h1>" + "Backorder" + "</h1>" + ((LineItemInfo)list[i]).ListPrice );
}
...
Go to the complete details ...