标签:new bsp list rand div 算法 string span stat
static void Test7() { var strs = new List<string> { "192.168.100.125", "192.168.100.126", "192.168.100.127", "192.168.100.128", "192.168.100.130", "192.168.100.131" }; var d = GetRandom(strs); } public static T GetRandom<T>(List<T> list) { System.Random ran = new System.Random(GetRandomSeed()); var t = ran.Next(0, list.Count); return list[t]; }
标签:new bsp list rand div 算法 string span stat
原文地址:https://www.cnblogs.com/liuxiaoji/p/10319781.html