本文介绍了如何生成随机字母特征的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi,请帮助我在忘记密码的情况下,如何生成某些网站所生成的字母数字字符串/代码.生成的字符串/字符被运送到相关人员的地方.指向教程/视频的任何链接都是hepfull
谢谢
anoop
hi please help me to how generate alphanumeric strings/code as its done by some website in forget password type situation . where generated strings/character is shipped to concerned person.any links to tutorial/videos would be hepfull
thanks
anoop
推荐答案
var charList = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
var randomNum = new Random();
var result = new string(
Enumerable.Repeat(charList, 8)
.Select(s => s[randomNum.Next(s.Length)])
.ToArray());
这篇关于如何生成随机字母特征的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!