Hi guys,
How can I rewrite this so that it is dynamic? That is, I want there to be a variable number of elements with the q# entries going from 1 to #...
decimal[] vals = new decimal[7];
vals[0] = Convert.ToDecimal (context.Request["q1"]);
vals[1] = Convert.ToDecimal (context.Request["q2"]);
vals[2] = Convert.ToDecimal (context.Request["q3"]);
vals[3] = Convert.ToDecimal (context.Request["q4"]);
vals[4] = Convert.ToDecimal (context.Request["q5"]);
vals[5] = Convert.ToDecimal (context.Request["q6"]);
vals[6] = Convert.ToDecimal (context.Request["q7"]);
Thanx in advance!


Reply With Quote