Example #1
0
 /// <summary>
 /// 得到来自factory生成的count个元素随机打乱后的列表
 /// </summary>
 public static IList <T> GetRandomList <T>(Func <T> factroy, int count)
 {
     return(ListTool.GetList(factroy, count).Shuffle());
 }
Example #2
0
        /// <summary>
        /// 得到来自factory生成的count个元素随机打乱后的列表
        /// </summary>
        public static IList <T> GetRandomList <T>(Func <int, T> factroy, int count)
        {
            var list = new T[count];

            return(ListTool.GetList(factroy, count).Shuffle());
        }
Example #3
0
        /// <summary>
        /// 得到从begNum起依此递增的cout个数字随机打乱后的列表
        /// </summary>
        public static IList <int> GetRandomList(int begNum, int count, int det = 1)
        {
            var list = new int[count];

            return(ListTool.GetList(begNum, count, det).Shuffle());
        }