public string GenerateCode(VerifyBuilder builder, out Bitmap image) { string str = ""; var random = new Random((int) DateTime.Now.Ticks); string[] strArray = CodeSerial.Split(new[] {','}); for (int i = 0; i < Length; i++) { int index = random.Next(0, strArray.Length - 1); str = str + strArray[index]; } image = builder.Build(str); return str; }
public string GenerateCode(VerifyBuilder builder, out Bitmap image) { string str = ""; var random = new Random((int)DateTime.Now.Ticks); string[] strArray = CodeSerial.Split(new[] { ',' }); for (int i = 0; i < Length; i++) { int index = random.Next(0, strArray.Length - 1); str = str + strArray[index]; } image = builder.Build(str); return(str); }