I am writing a small password generator and have 4 CheckBoxes for the combinations, these are: Upper Case Letters, Lower Case Letters, Numbers and Special Characters.
My question is – do I have to go through each possible combination of CheckBoxes in the logic with “if” statements or is there a quicker, more simple way that could shorten the code more?
I am sorry if this question is rather silly, but it will really help me in the future to learn from this if indeed there is a better way.
All the best
Chris ( shamballa ).
Why do you think which you must through each possible combination of CheckBoxes?
check this basic function.
Suppose do you have 4 checkboxes called CbUpper, CbLower, CbNumbers, CbSymbols.
Now you can construct a function like this
and call in this way