Pedestrian, Penang
In addition to the other comments:
How long do you want each string?
How random do you want each string?
To get random "password" keys (WEP Keys) I will use
RNGCryptoServiceProvider.GetNonZeroBytes:
http://msdn2.microsoft.com/en-us/lib...zerobytes.aspx
Followed by BitConverter.ToString:
http://msdn2.microsoft.com/en-us/library/3a733s97.aspx
If you don't want or need a cryptographically strong sequence of values, you
could use System.Random in a loop. Just remember to create the new
System.Random object outside the loop then call its Next method inside the
loop:
http://msdn2.microsoft.com/en-us/lib...em.Random.aspx
I would use the Random.Next method that accepted a range of values...
passing in Char code points
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"pedestrian via DotNetMonster.com" <u16758@uwewrote in message
news:64c80eac0a1a0@uwe...
| Let's say I declares an array of string (of size 1000),
| how to fill every elements of it with random characters?
|
| Dim myStrArray(999) As String
| ..
|
| Thanks...
|
| --
| Pedestrian, Penang.
|
| Message posted via DotNetMonster.com
|
http://www.dotnetmonster.com/Uwe/For...b-net/200608/1
|