码迷,mamicode.com
首页 > Windows程序 > 详细

C#随机数小知识

时间:2016-11-24 18:00:26      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:i++   []   add   new   ++   lis   tar   and   range   

    public int[] array = new int[132] {

        115,  105,106,107,108,109,110,111,112,113,114,

        215,  205,206,207,208,209,210,211,212,213,214,

        315,  305,306,307,308,309,310,311,312,313,314,

        415,  405,406,407,408,409,410,411,412,413,414,

    

        115,  105,106,107,108,109,110,111,112,113,114,

        215,  205,206,207,208,209,210,211,212,213,214,

        315,  305,306,307,308,309,310,311,312,313,314,

        415,  405,406,407,408,409,410,411,412,413,414,

 

        115,  105,106,107,108,109,110,111,112,113,114,

        215,  205,206,207,208,209,210,211,212,213,214,

        315,  305,306,307,308,309,310,311,312,313,314,

        415,  405,406,407,408,409,410,411,412,413,414};

 

void Start () {

        List<int> list = new List<int>();

        

       for (int i = 0;i<array.Length/4;i++){

           int num = array[Random.Range(105,array.Length)];

           list.Add(num);

       }

       for (int i = 0; i < list.Count; i++)

       {

           print("xxxxxx:" + list[i]);

       }

}

C#随机数小知识

标签:i++   []   add   new   ++   lis   tar   and   range   

原文地址:http://www.cnblogs.com/wanggang550/p/6098451.html

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