How can I generate random alphanumeric strings?

Posted by Editorial Staff | Updated on

In this answer, We have shared how can I generate random alphanumeric strings? I heard LINQ is the new black, so here’s my attempt using LINQ:

Note: The use of the Random class makes this unsuitable for anything security related, such as creating passwords or tokens. Use the RNGCryptoServiceProvider class if you need a strong random number generator.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers