码迷,mamicode.com
首页 > 移动开发 > 详细

数组随机手机号

时间:2015-04-13 22:18:28      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:

    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();
        }

数组随机手机号

标签:

原文地址:http://www.cnblogs.com/Mr-xue/p/4423186.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!