I have to create a password and I believe that I can do it, however I am stumped at the very beginning. I have 3 strings of characters, I would like to randomly select one of th
I suggest you to use ListOf string instead for this. you can code like the following;
Dim listofStrings As New List(Of String) ' Declaration of list of strings
listofStrings.Add("qwertyuiopasdfghjklzxcvbnm") 'assign values to the list
listofStrings.Add("MNBVCXZLKJHGFDSAPOIUYTREWQ")
listofStrings.Add("1234567890")
Dim rnd As New Random
Dim randomString As String = listofStrings.Item(rnd.Next(0, 3))'select random string from the list
it will generate random numbers between 0 and 2 hence it will help you to select random string from the list of strings based on index referenced by the random number
The below code will help you generate a random number and then pick up the string at that position in the array
string[] arr= {"qwertyuiopasdfghjklzxcvbnm","MNBVCXZLKJHGFDSAPOIUYTREWQ","1234567890"};
Random rnd = new Random();
int cnt = rnd.Next(2);
string r = arr[cnt];