Hi all, i have quick doubt it will be helpful to resolve the issue. i need to generate random Number without repitative the Number in index - 6 digits.

is the request about unique random numbers with a length of 6 or

create all possible combinations of 6 digits length number without any repeated digit

Any set size limit or fully completed?

Hi ppr without repetative we need random number. like for example 123456 this is fine for our case. 122456 this is we donβt need.

New Random().Next(100000,999999).ToString this will generate a random number with 6 digits, but there is a possibility for digits repeating with in the 6 digits.

what you can do is,

use num = New Random().Next(0,9).ToString to generate 6 digits separately (u can use while loop) and check if there are any repeat numbers and join all the 6 digits if no repeated digits

if there is a repeat digit regenerate that digit and finally join it

hope this is helpful

μ§λ¬Έμ λ§λ μμ€μΈμ§ νμΈν΄λ³΄μΈμ

thanks for answer

123456 OK

654321, 213456 will it be included as well into the set?

How much numbers do you want get generated? 10, 100 all possible combinations?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.