What is the most efficient way to generate 10-character random alphanumeric string in c#?
What is the most efficient way to generate 10-character random alphanumeric string in c#?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Guid is pretty fast
From MSDN
It might not be unique for a billion requests since you need only 10 characters. But it generates a string from 0 to 9 and A to F.
Performance
Tested using
Guid method
Bytes method
It is up to you to pick between
high speedorhigh reliability.