遇到问题:for循环中Random()产生相同随机数;(详见:for循环里面和外面的Random函数的有意思现象)
1 Random vr = new Random(); 2 int vri = vr.Next(2);
解决方法:
使用Random vr = new Random(Guid.NewGuid().GetHashCode())代替 Random vr = new Random()
1 Random vr = new Random(Guid.NewGuid().GetHashCode()); 2 int vri = vr.Next(2);