1:随机数的基数为大写字母26个,和数字0-9

namespace test
{
    
class Program
    {

      
       
static void Main(string[] args)
        {
            
string result = string.Empty;
            
string[] arrString = { "A""B""C""D""E""F""G""H""I""J""K""L""M""N""O""P""Q""R""S""T""U""V""W""X""Y""Z""0""1""2""3""4""5""6""7""8""9", };
            Random rd 
= new Random();
            
for (int i = 0; i < 8; i++)
            {
                result 
+= arrString[rd.Next(arrString.Length-1)];
            }
            Console.WriteLine(result);
            Console.ReadLine();
           
        }

     
    }
}

相关文章:

  • 2021-06-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2021-08-05
  • 2021-12-18
  • 2022-12-23
  • 2021-09-18
  • 2021-06-12
相关资源
相似解决方案