通过本文主要向大家介绍了欲情 c max,维生素c,crh2c,奔驰c200,85度c加盟等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
代码如下:
string ss = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; Random a = new Random(); int b; string yan = ""; for (int i = 0; i < 4; i++) { b = a.Next(62); yan += ss.Substring(b, 1); } Console.WriteLine("验证码是:" + yan); Console.Write("请输入验证码:"); string c = Console.ReadLine(); if (c.ToUpper() == yan.ToUpper()) { Console.WriteLine("验证码正确!"); } else { Console.WriteLine("验证码错误!"); } Console.ReadLine();</div>
以上这篇C#验证码问题的快速解决方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。
</div>