C
C#•3y ago
4

How to make Random Password Generator [Answered]

i just wirte this and cant continue pls help
16 Replies
Buddy
Buddy•3y ago
Think about the logic required to generate a random password text
4
4OP•3y ago
how ? i will try again
TheRanger
TheRanger•3y ago
Random has a method called Next that you can generate a number between 2 numbers use that number to pick one of the characters from the string through the string's indexer
4
4OP•3y ago
should i use string method here?
TheRanger
TheRanger•3y ago
what string method?
🦃 Async-Void 》🦃
rnd.Next(0, charecters.Length) will give you an int for the index of a position in charecters string
TheRanger
TheRanger•3y ago
Length not Lemgth
4
4OP•3y ago
thank you i understood how i can write this
TheRanger
TheRanger•3y ago
if you don't have an issue anymore write /close to close this thread
shadi
shadi•3y ago
@cupck Split that string into char array. from there, you can decide how long each password is, and then setting each character to be of array[randomNumbe]
TheRanger
TheRanger•3y ago
string is already(acts) like a char array it has .Length property, and an indexer
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
HimmDawg
HimmDawg•3y ago
I think RandomNumberGenerator is the cryptographically better option (instead of Random), if you wanna take your generator to the next level
4
4OP•3y ago
thank you all, finally i was able to write the code
Accord
Accord•3y ago
✅ This post has been marked as answered!
Want results from more Discord servers?
Add your server