How to generate words randomly

R

Raghuram

I want to generate some set of chars which are more than 4 chars randomly. .
.. how can i do that
 
G

Grant Merwitz

Guid!

Guid MyGuid = Guid.NewGuid();

Now MyGuid.ToString() will be a random generated string.

You can break this down to be the desired length as well
 
L

Lucas Tam

I want to generate some set of chars which are more than 4 chars
randomly. . . how can i do that


You use the Random classes in .NET to generate the password length, plus
generate the random character:
http://www.brettb.com/RandomNumbersInDotNet.asp

To select the character, you would use the function:

Convert.ToChar(i).ToString() where i is an integer (take a look at an ASCII
table for the corresponding character).


Here is an example:
http://www.codeproject.com/csharp/randpassgen.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top