public static string CreateRandomNumericString(int length) { string result = ""; string randChrs = "0123456789"; for (int i = 0; i < length; i++) { result += randChrs[ODRandom.Next(0, randChrs.Length - 1)]; } return(result); }
public static string CreateRandomAlphaNumericString(int length) { string result = ""; string randChrs = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; for (int i = 0; i < length; i++) { result += randChrs[ODRandom.Next(0, randChrs.Length - 1)]; } return(result); }