using System; using System.Collections; using System.Collections.Generic; using
System.Linq; namespace Core.Util { /// <summary> /// Random Random number helper class /// </summary>
public static class RandomHelper { private static Random _random { get; } = new
Random(); /// <summary> /// Next random number /// </summary> /// <param
name="minValue"> minimum value </param> /// <param name="maxValue"> Maximum </param> ///
<returns></returns> public static int Next(int minValue, int maxValue) { return
_random.Next(minValue, maxValue); } /// <summary> /// Next random value /// </summary> ///
<typeparam name="T"> Value type </typeparam> /// <param name="source"> A collection of values </param> ///
<returns></returns> public static T Next<T>(IEnumerable<T> source) { return
source.ToList()[Next(0, source.Count())]; } } }

Technology
©2020 ioDraw All rights reserved
Sharing a script of hacker empire code rain , Simple and fun !-bash The Trojan horse , Have you ever met one ?k8s delete pod Zhejiang University data structure midterm examination questions Detailed explanation PHP Medium die,exit,returnlayui.table Examples of dynamically getting header and list data Interview questions : Handwritten list ( Include reverse linked list ) After the outbreak Which programming has a bright future PTA Quick sort Ctrip 2019 School recruitment LRU Cache