I have List<Class>
originated from a class. The properties of the class are:
datetime DataCotacao
double ValorCotação
double FatorDiario
Following the data registered for example:
Data FatorDiario
04/12/17 1,02077
05/12/17 1,03006
06/12/17 1,04563
07/12/17 1,03328
I would like to make a logic that from a condition where with two parameters of an StartDate and a EndDate, for example:
05/12/17 and 07/12/2017, the list returned the values of 1.03006, 1.04563, and 1.03328, and with these, I performed the multiplication in that order:
1º iteração: 1,03006
2º iteração: 1,03006 * 1,04563 = resultado em 1,0770616
3º iteração: 1,0770616 * 1,03328 = resultando em 1,112906
And the accuracy of the values here is the least important. I would really like to know the logic that I should implement to arrive at this final result (1.112906) taking all the conditions presented above.