I need to add the weighted the times the cycle is run and show it in builder.Append(total suma ponderados).Append(";");
, my code is as follows:
foreach (var item_ponderado in listobjetivos)
{
var ponderado = (item_ponderado.p.Peso_Objetivo * item_ponderado.o.calificacion / 100);
Builder.Append(ponderado).Append(";");
}
builder.Append(total suma ponderados).Append(";");
Let me explain, I need to add the value of the weighted variable the times that the cycle is traversed, and I can save it in a variable for example total_ponderados
to show it in builder.Append(total suma ponderados).Append(";");
I do not know if I understand.
An example:
The first time the cycle was run the weighted value was 0.5 and the second time it was scanned is 1.5, the value 2 is saved in a variable to show it where mentioned above.