This sample shows how to generate a random string.
public string GetRandomNumbers(int numChars) { string[] chars = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z","0","1", "2", "3", "4", "5", "6", "7", "8", "9" };
Random rnd = new Random(); string random = string.Empty; for (int i = 0; i < numChars; i++) { random += chars[rnd.Next(0, 33)]; } return random; }
|
No responses found. Be the first to respond and make money from revenue sharing program.
|