I need help on making a windows form application with a numericupdown and listbox button on it. when I enter 2 in numericupdown button, it should write

1,2

2,1

in listbox.

or when I enter 3 in numericupdown, it should create

1,2,3
1,3,2
2,1,3
2,3,1
3,1,2
3,2,1

it is like a binary tree, creating all possible options. please help!!!