15,919,178 members
See more:
I have a question.

You have 2 textboxes, one listbox and one button.
You have to put one number in each of the textboxes then when you click the button the numbers are supposed to be in the textbox and be arranged as follows...

You put number 1 on the first text box then number 4 on the other textbox, the listbox should contain, 1 2 3 4 respectively, help please!
Posted
Updated 7-Dec-11 22:30pm
v2
Dalek Dave 8-Dec-11 4:30am
OriginalGriff 8-Dec-11 4:41am
That doesn't make a lot of sense - where did 2 and 3 come from? Why does the list box get 1 and 4 when you didn't tell it to?
Use the "Improve question" widget to edit your question and provide better information.
[no name] 8-Dec-11 4:44am
maybe the range from 1-4
paulroa 8-Dec-11 4:47am
yes it is supposed to be like that, when you out 1 in the first textbox and 4 in the other textbox and click the button the listbox should contain 1 2 3 4 respectively.
paulroa 8-Dec-11 13:20pm
How do you sort the numbers in the list box in descending order

## Solution 1

Try this one:

C#
```int firstNumber = Convert.ToInt32(TextBox1.Text);
int secondNumber = Convert.ToInt32(TextBox2.Text);

for(int i = firstnumber ; i < secondNumber; i++)
{
}```

Regards,
Eduard