the way i do it atm is to just use an if statement for every X i would like, so
if(x==1)
savedListvalue[savedListvalue.Count-1].Value
if(x==2)
savedListvalue[savedListvalue.Count-1].Value + savedListvalue[savedListvalue.Count-2].Value
if(x==3)
savedListvalue[savedListvalue.Count-1].Value + savedListvalue[savedListvalue.Count-2].Value + savedListvalue[savedListvalue.Count-3].Value
and so on and so forth. needless to say that this is rather awkward and static and makes the code really blown up pretty fast
anyone an idea for an more elegant way?
Comment