|
-
May 19th, 2003, 05:48 AM
#1
Thread Starter
Lively Member
Dynamically building statements
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|