C# 得到指定位數的隨機數



   
/// <summary>
    
/// 得到隨機數
    
/// </summary>
    public int GetRandomValue()
    {
        Random rd 
= new Random();
        
//得到四位隨機數
        int iRandom = rd.Next(10009999);

        
return iRandom;
    }
原文地址:https://www.cnblogs.com/scottckt/p/1166110.html