Possible Duplicate:
How can I generate random 8 character, alphanumeric strings in C#?
I have the array in the name of letters.now i need to select 5 character randomly.If i use the following code i can select only one character.How to Select the 5 digits in given array string random?
String[] letters = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q" };
Random rand = new Random();
String number = letters[rand.Next(1,10)];