数组随机手机号

    static void Main(string[] args)
        {
            string[] a = new string[]{"13045674567","15065477456","13245679876",

                         "15263332121","18799998888","13778964563","15212312312",

                         "13012341234","18388887777","15000000000"};
            Random rand = new Random();
            for (int i = 1; i <= 50; i++)
            {
                int b = rand.Next(a.Length);                        //随机生成下标
                string s = a[b];                                              //取元素值
                  Console.Clear();  
                Console.WriteLine(s);
                Thread.Sleep(1000);
            }
            Console.ReadLine();
        }

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。