/// <summary> /// 快捷生成验证码 /// </summary> /// <param name="filePath">生成的图片的存放路径</param> /// <returns>生成的验证字符串</returns> public static string Next(string filePath) { ValidateCodeOP op = new ValidateCodeOP(); op.Image.Save(filePath); return(op.Text); }
public static void Main() { Console.WriteLine(ValidateCodeOP.Next("c:\\valicode.png")); Console.ReadLine(); }