首页 > Windows开发 > 详细

C# 随机生成验证码

时间:2021-01-10 15:20:01      阅读:42      评论:0      收藏:0      [点我收藏+]
public static string GetCode()
{
string strList ="1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
Random rd = new Random();
string strResult = "";
for (int i = 0; i < 6; i++)
{ strResult
+= strList[rd.Next(0, strList.Length)]; } return strResult; }

 

C# 随机生成验证码

原文:https://www.cnblogs.com/PinkMi/p/14258051.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!