Hi guys Ive been trying different ways in which one can add to a list and save up on lines of coding at the same time. Failing miserably however :(
What i am trying to do is have a feature where the user inputs 2 values via textboxes and then the system multiplies those values and adds random values to a list.
so if the values entered were 2 and 4 then the system should produce 8 random numbers and add them to a list.
Thanks guys!
Loading

VulpesRank #55 · 29.2K reputationPosted Jan 7, 2012, 3:06 AM EST
Krishna GaradRank #191 · 12.8K reputationPosted Jan 6, 2012, 7:49 PM EST
on global level declare the list
List
in event where you want to multiply the values write
double val1=Convert.ToDouble(txtval1.text);
double val2=Convert.ToDouble(txtval2.Text);
double result=val1*val2;
lst.Add(result);
Sam HobbsRank #107 · 20.5K reputationPosted Jan 7, 2012, 1:12 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Jan 7, 2012, 7:33 AM EST
John34 reputationPosted Jan 7, 2012, 8:12 AM EST
VulpesRank #55 · 29.2K reputationPosted Jan 7, 2012, 8:54 AM EST